Results 1 to 3 of 3

Thread: Ajax Tabs Content script

  1. #1
    Join Date
    Apr 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Ajax Tabs Content script

    1) Script Title: Ajax Tabs Content script

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...axtabscontent/

    3) Describe problem:
    Hi,
    look first at this page please: http://www.ontheweb.cz/_hotels-europe/
    I am trying send country ID from tab One (Countries) in to tab Two (Cities) so I can view only cities which are in selected country. Can any one help me with this? I don’t understand Javascript at all and it already took me whole day without any results :-( Thanks.
    Petr

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    I can only talk in generality here, since this is something that involves both the client and server side that only you have access to. But I would imagine what you need to do is modify the function:

    Code:
    function expandtab(tabcontentid, tabnumber, query){ //interface for selecting a tab (plus expand corresponding content)
    var thetab=document.getElementById(tabcontentid).getElementsByTagName("a")[tabnumber]
    if (thetab.getAttribute("rel")){
    var querystr=(typeof query!="undefined")? query : ""
    ajaxpage(thetab.getAttribute("href")+querystr, thetab.getAttribute("rel"), thetab)
    loadobjs(thetab.getAttribute("rev"))
    }
    }
    With an optional 3rd parameter to pass in a query string, and add it to the URL of the Country Tab to load a different page accordingly. The code in red shows the changes made to the original function.

    BTW, please note that your page is currently in violation of our usage terms, since the credit notice doesn't appear inline on the page. Please reinstate the credit notice:

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

    Exclamation not working :-(

    Sorry for really late answer. I just stop working on this for a while and now get back.
    Your solution is unfortunately not working. After changing code it stops on loading the page with "Requesting content..." text.

    Any sujestiong where can be problem? It is not neccessary to have country ID as a name it can be also number.

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
  •