Results 1 to 3 of 3

Thread: OnClick select a tab and then load external page

  1. #1
    Join Date
    Apr 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default OnClick select a tab and then load external page

    1) Script Title: Ajax Tabs Content

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

    3) Describe problem:

    Hi,

    I have a link like this: <a href="karrantza.html" onClick="pruebas.expandit(1);pruebas.loadajaxpage('karrantza.html');map.setCenter(new GLatLng(43.21168197765769, -3.3956336975097656), 13);return false;">Ver información</a>

    I first want to select the 2nd tab and then load there an external page.

    The problem is sometimes it first loads the page and then expands the tab, maybe it's because they are asynchronous functions. I don't know.

    This is my website: www.euskadi.comze.com

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

    Default

    The delay should be negligible, since the time it takes to select a tab should be virtually instantaneous, matching the minimum time it takes to load the associated Ajax page using loadajaxpage(). Testing your page out in FF3.x, I don't really see much of an issue.
    DD Admin

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

    Default

    Thanks for the answer ddadmin.

    That issue happened much often when I had something like this:

    Code:
    pruebas.onajaxpageload=function(pageurl)
    {
       if (pageurl.indexOf("rallyes.html")!=-1)
       {
       map.setCenter(new GLatLng(43.02134110532715, -2.6292703247070312), 9);
       }
    }
    Maybe it was because map.setCenter() needs more time than loadajaxpage(). Anyway, I think i won't use this code.

    Now I have another question concerning nested tabs, but I'll open a new thread, thanks.

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
  •