View Full Version : Ajax Nested Tabs Content submit page problem

10-26-2007, 12:09 AM

I setup the Ajax Nest Tabs Content successful and it works fine. However, I have problem that the tabs are disappeared after submitted to another page.

1. My first main.asp page contains the main tabs, when I click Information, it will trigger another page called Mainsub.asp has nested tabs.

<h3><a href="#" rel="#default" class="selected"></a></h3>
<ul id="countrytabs" class="shadetabs">
<li><a href="#" rel="#default" class="selected"></a></li>
<li><a href="MainSub.asp" rel="countrycontainer">Information</a></li>
<li><a href="external3.htm" rel="countrycontainer">Skill Set</a></li>
<li><a href="external4.htm" rel="#iframe">Skill Matrix</a></li>
<li><a href="http://www.dynamicdrive.com">Search</a></li>
<div id="countrydivcontainer" class="custombody" style="border:1px; width:90%; height:auto margin-bottom: 1em; background:#FFFFFF padding: 10px">

<script type="text/javascript">
var countries=new ddajaxtabs("countrytabs", "countrydivcontainer")
countries.setselectedClassTarget("link") //"link" or "linkparent"

if (pageurl.indexOf("MainSub.asp")!=-1){
var provinces=new ddajaxtabs("provincetabs", "provincedivcontainer")
provinces.setselectedClassTarget("link") //"link" or "linkparent"


2. My Mainsub.asp has this code to links to different page.

<h3><a href="#" rel="#default" class="selected"></a></h3>
<ul id="provincetabs" class="steven1">
<li><a href="Techlist.asp" rel="provincedivcontainer">Tech List</a></li>
<li><a href="AddTech.asp" rel="provincedivcontainer">Add Tech</a></li>
<li><a href="external4.htm" rel="#iframe">Test3</a></li>
<li><a href="http://www.dynamicdrive.com">Test4</a></li>
<div id="provincedivcontainer" class="custombody" style="border:1px; width:90%; height:auto margin-bottom: 1em; background:#FFFFFF padding: 10px">

The problem is the AddTech.asp page is adding record into database, and after that it response.redirect to another page call AddTechResult.asp to inform that record has been inserted successful. This is when I lost all the tabs.

Is there a way to make the AddTechResult.asp stay in the same frame of the previous page (AddTech.asp).

Thanks in advance,

10-26-2007, 12:44 AM
Warning: Please include a link to the DD script in question in your post. See this thread (http://www.dynamicdrive.com/forums/showthread.php?t=6) for the proper posting format when asking a question.

This actually isn't directly related to Ajax Tabs script. Basically you'll need to modify AddTechResult.asp somehow so the response is returned via Ajax, instead of actually going to that page. It's very similar in theory to modifying a form submission script so to submit a form via Ajax. Unless you're familiar with Ajax, it might be difficult for you.

10-26-2007, 12:58 AM
Sorry, First time posting here so didn't not know much about the rules.

I am pretty new to Ajax, if you have an example of a form submission script that submit via Ajax, or if I post my AddTechResult.asp page here, do you think you can help me with?
really appreciated.


10-26-2007, 10:18 AM
I'm not familiar with ASP unfortunately, so it probably won't do much to post the source of your .asp page. You might want to check out Basic Ajax Routine (http://www.dynamicdrive.com/dynamicindex17/ajaxroutine.htm), and see if you can integrate it somehow with the ASP page.

10-26-2007, 04:22 PM
Thanks ddadmin, Will do!