Epsum factorial non deposit quid pro quo hic escorol. Olypian quarrels et gorilla congolium sic ad nauseum. Souvlaki ignitus carborundum e pluribus unum. Defacto lingo est igpay atinlay. Marquee selectus.
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci.
Ma quande lingues coalesce, li grammatica del resultant lingue es plu simplic e regulari quam ti del coalescent lingues. Li nov lingua franca va esser plu simplic e regulari quam.
Just remove (my_sub.style.display = "none";) from the external js file
GL Oct 31, 2008
Do you have the correct path to the external file? If so, due to the limitations of these comments, you will need to submit your question to the [a href="http://www.webdeveloper.com/forum/forumdisplay.php?f=3"]JavaScript Forum[/a] for further help.
Lee Underwood Jan 29, 2008
I love this script, but I can not get it to work an external file. I created the file and saved it as "pageOrganizer.js" and in the file I have var subs_array = new Array("sub1","sub2","sub3");// Put the id's of your hidden divs in this array[br /][br /]function displaySubs(the_sub){[br /]	 if (document.getElementById(the_sub).style.display==""){[br /]	 document.getElementById(the_sub).style.display = "none";return[br /] }[br /] for (i=0;i<subs_array.length;i++){[br /]	 var my_sub = document.getElementById(subs_array[i]);[br /]	 my_sub.style.display = "none";[br /]	 }[br /] document.getElementById(the_sub).style.display = "";[br /]}[br /] but it always errors out. To test the code I pasted it into my html and it works. Checked my path and name of the file and it doesn't work. I even checked viewed the source of this page a found that the js was also pasted into the html and did not refer to and external js file?[br /][br /]Any idea's?
Leave a Response
(3 comments)Just remove (my_sub.style.display = "none";) from the external js file
Do you have the correct path to the external file? If so, due to the limitations of these comments, you will need to submit your question to the [a href="http://www.webdeveloper.com/forum/forumdisplay.php?f=3"]JavaScript Forum[/a] for further help.
I love this script, but I can not get it to work an external file. I created the file and saved it as "pageOrganizer.js" and in the file I have var subs_array = new Array("sub1","sub2","sub3");// Put the id's of your hidden divs in this array[br /][br /]function displaySubs(the_sub){[br /]	 if (document.getElementById(the_sub).style.display==""){[br /]	 document.getElementById(the_sub).style.display = "none";return[br /] }[br /] for (i=0;i<subs_array.length;i++){[br /]	 var my_sub = document.getElementById(subs_array[i]);[br /]	 my_sub.style.display = "none";[br /]	 }[br /] document.getElementById(the_sub).style.display = "";[br /]}[br /] but it always errors out. To test the code I pasted it into my html and it works. Checked my path and name of the file and it doesn't work. I even checked viewed the source of this page a found that the js was also pasted into the html and did not refer to and external js file?[br /][br /]Any idea's?