Results 1 to 4 of 4

Thread: Javascript on default tab and disabled when click on another tab and return to defaul

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

    Default Javascript on default tab and disabled when click on another tab and return to defaul

    1) Script Title: Ajax Tabs Content Script (v 2.0)

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

    3) Describe problem: Hi, I'm planning to use Ajax Tabs Content Script for listing houses profiles but I have two javascripts on the default tab for calculating the monthly mortgage payment (one for slide bars and one for ajax response) and when I click on another tab and return to the default tab these javascript are no longer active. I have read posts here about reactivate external onload scripts but i'm not very good with javascript and i can't find the solution. The page is http://www.meditecasa.com/listing-Ch...piscina-2.html. If anyone can help me, i would be very helpful

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

    Default

    Why not just move the two JavaScripts from the default tab onto somewhere else within your main page, such as the HEAD section?

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

    Default

    Hi, I've tried that but, by the way, seems that at least one of the scripts must be inside in order to work. And, by other side, although the other routine is in the head doesn't work when return to the 'default tab'. I think it must be related with onload but I'm not good with javascript and can't solve it.

    This is at the end of the slider JS (CARPE S l i d e r v. 1.5 by Tom Hermansson Snickars)
    window.onload = function()
    {
    sliders = carpeGetElementsByClass(carpeSliderClassName)
    for (i = 0; i < sliders.length; i++)
    {
    sliders[i].onmousedown = slide
    }
    displays = carpeGetElementsByClass(carpeSliderDisplayClassName)
    for (i = 0; i < displays.length; i++)
    {
    displays[i].onfocus = focusDisplay
    }
    }
    Last edited by sorroman; 10-26-2007 at 08:10 AM.

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

    Default

    Please post a link to the page on your site that contains the problematic script so we can check it out.

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
  •