Results 1 to 5 of 5

Thread: Ajax Nested Tabs Content submit page problem

  1. #1
    Join Date
    Oct 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Ajax Nested Tabs Content submit page problem

    Hi,

    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.
    Code:
    <body>
    <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>
    </ul>
    <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.setpersist(true)
    countries.setselectedClassTarget("link") //"link" or "linkparent"
    countries.init()
    
    countries.onajaxpageload=function(pageurl){
    if (pageurl.indexOf("MainSub.asp")!=-1){
    var provinces=new ddajaxtabs("provincetabs", "provincedivcontainer")
    provinces.setpersist(true)
    provinces.setselectedClassTarget("link") //"link" or "linkparent"
    provinces.init()
    }
    
    }
    </script>
    </body>
    2. My Mainsub.asp has this code to links to different page.
    Code:
    <body>
    <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>
    </ul>
    <div id="provincedivcontainer" class="custombody" style="border:1px; width:90%; height:auto margin-bottom: 1em; background:#FFFFFF padding: 10px">
    </body>
    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,

  2. #2
    Join Date
    Aug 2004
    Posts
    9,910
    Thanks
    3
    Thanked 969 Times in 957 Posts
    Blog Entries
    15

    Default

    Warning: Please include a link to the DD script in question in your post. See this thread 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.

  3. #3
    Join Date
    Oct 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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.

    Thanks,
    Last edited by SunnyVu; 10-26-2007 at 02:11 AM.

  4. #4
    Join Date
    Aug 2004
    Posts
    9,910
    Thanks
    3
    Thanked 969 Times in 957 Posts
    Blog Entries
    15

    Default

    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, and see if you can integrate it somehow with the ASP page.

  5. #5
    Join Date
    Oct 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks ddadmin, Will do!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •