PDA

View Full Version : Ajax Tabs Content Script don't work on firefox 3



arttree
07-02-2008, 08:18 AM
1) Script Title: Ajax Tabs Content Script (v 2.2)

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

3) Describe problem: Hello,

i modified the codes in external2.htm as below

This is the contents of "external2.htm"<br />
This is the contents of "external2.htm"<br /><br />
This will open <a href="javascript: countries.expandit(2)">tab no 3</a><br />
so that user can click on the "tab no 3" link to open the tab no 3. This modication work very well in IE 7. But i have problem with Firefox ver 3. The FF refuse to do anything at all. Why FF no response at all?

jscheuer1
07-02-2008, 10:21 AM
I still use FF 2. Check the error console in FF 3 though. Also, are you sure you have javascript enabled? Do you have a problem with the demo page on DD in FF 3?

arttree
07-02-2008, 10:58 AM
i don't have any problem with the demo page on DD in FF 3. javascript enabled.

no error message in error console in FF 3. seem like nothing happen when click on the link inside external2.htm.

jscheuer1
07-02-2008, 11:15 AM
How is external2.htm being imported? If via iframe, it shouldn't work in any browser. However, the construction:



<a href="javascript: countries.expandit(2)">

has never been the best idea, as it tells the browser to start unloading the page. Generally this has only been a problem in a few specific instances in IE, at least that I am aware of, and may have nothing to do with your problem. Still, I would try:


<a href="javascript: countries.expandit(2)" onclick="countries.expandit(2);return false;">

This overrides the href and executes the onclick event without telling the browser to start the unload process.

Other than those two things (the import method and the execution syntax), the only other thing I can think of is that somehow FF 3 is stripping all script code from imported content, or perhaps even just refusing to parse it as script code (this could perhaps even be a setting in the browser doing one of these things). My second idea may help with that, as it is at least valid HTML.

arttree
07-02-2008, 11:41 AM
You're right! :D

Your overrides the href and executes the onclick event without telling the browser to start the unload process, do the trick.


<a href="javascript: countries.expandit(2)" onclick="countries.expandit(2);return false;">

FF3 working like charm now! Why i never think of that, silly i!

Thank you!