PDA

View Full Version : Javascript on default tab and disabled when click on another tab and return to defaul



sorroman
10-25-2007, 05:55 PM
1) Script Title: Ajax Tabs Content Script (v 2.0)

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/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-Chalet+independiente+con+piscina-2.html. If anyone can help me, i would be very helpful

ddadmin
10-26-2007, 12:49 AM
Why not just move the two JavaScripts from the default tab onto somewhere else within your main page, such as the HEAD section?

sorroman
10-26-2007, 07:36 AM
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
}
}

ddadmin
10-26-2007, 10:10 AM
Please post a link to the page on your site that contains the problematic script so we can check it out.