svoltmer
May 7th 2008, 7:08 am
How would I write the javascript syntax to place all the scripting for form pulldowns on an external .js file?
Here is what I have, but it is not correct and won't display the pulldowns. I am sure it is just my syntax. Can you help? Thanks!
Link to webpage: http://www.crosst.org/test/
The pulldowns are for the "Devotional" on the mid right side of page.
<!-- devotional -->
document.write('<form class="devotion" action="" name="someform"><select id="monthdropdown"><\/select><select id="daydropdown"><\/select><\/form><button style="margin-top:8px; padding:2px 3px 2px 3px;width:auto; height:auto; text-align:center;" onclick="document.location=('http:www.crosst.org/devotional/' + document.getElementById('monthdropdown').value + document.getElementById('daydropdown').value + '.html');">GO<\/button><script type='text/javascript' src='devotional.js'> window.onload=function(){populatedropdown("monthdropdown", "daydropdown")}<\/script>');
<!-- Book of the Month -->
document.write('<div class="tab_botm">Book of The Month<\/div>');
Here is what I have, but it is not correct and won't display the pulldowns. I am sure it is just my syntax. Can you help? Thanks!
Link to webpage: http://www.crosst.org/test/
The pulldowns are for the "Devotional" on the mid right side of page.
<!-- devotional -->
document.write('<form class="devotion" action="" name="someform"><select id="monthdropdown"><\/select><select id="daydropdown"><\/select><\/form><button style="margin-top:8px; padding:2px 3px 2px 3px;width:auto; height:auto; text-align:center;" onclick="document.location=('http:www.crosst.org/devotional/' + document.getElementById('monthdropdown').value + document.getElementById('daydropdown').value + '.html');">GO<\/button><script type='text/javascript' src='devotional.js'> window.onload=function(){populatedropdown("monthdropdown", "daydropdown")}<\/script>');
<!-- Book of the Month -->
document.write('<div class="tab_botm">Book of The Month<\/div>');