Hi, I was testing out a new java script menu on my site when I noticed that the iframe does not show when using java script I was also using java script to show content but both wont work at the same time. both of them work of the same .js file but have completely seperate head and css Anyone else come across a similar problem?
Hi larry here is the test http://www.thecelticrugcompany.ie/test/ page. as you can see the menu on the left does not work but the content on thhe right does this can differ I think it is to do with which code is introduced first.
About the iframe i tried it again on a new page and it did work
You can only use the script once on a page. The script names are not unique (on a per-script- basis), so using the script more than once will cause the script to overwrite the previous script contents, thus negating its effects.
If you can post a page with an i-frame example, I'll look at that also.
I did try to change the name of the .js file for one of them but still the same result is it the script content that clashes rather than the file name? I cannot recreate the situation were the iframe would not show
It is the script content that clashes. If you really need the script twice on a page, copy the original script (ddaccordian.js) to another file (e.g., ddaccordian2.js), open it in a plain text editor, locate the line:
quote:
var ddaccordian=(
and change the var name to a different name (e.g., ddaccordian2) and then use this var name for your second menu.
Hi Larry, Tried that still no joy I think they need to be completly different to work I'll try another one or take my finger out and make a dropdown menu myself