View Full Version : Resolved Help the script is not working-all files linked

01-31-2011, 03:26 AM
Hi Folks, I am back trying to figure out why this wont' work:

The original script is on this page that works fine:

Now I want to put the javascript in to a file by it self:

And tried the link to the external file on this page:

Now I can tell that it is not working due to the text in the dropdown when the page loads-it should have JavascriptKit in it.This is a place holder is there instead telling me the javascript code is not being rendered (is that the right way to say it?)

What is wrong with the drop.js file? I thought the start and end tags(<script></script>) have to be removed.

I am confused with this and any help would be greatly appreicated.



ps-Would people prefer to have the code put here instead of the links to each file?I want to do this the prefered way if I can :)

01-31-2011, 07:32 AM
It seems to work if you put the javascript at the bottom of the page instead of in the head section. I guess the form has to load before the script for it to work.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<title>dropdown test</title>
<form name="dynamiccombo">
<select name="stage2" size="1">
<option value="#">This is a Place Holder</option>
<option value="#">This is a Place Holder</option>
<option selected="selected" value="#">This is a Place Holder</option>
<input name="test" value="Go!" onClick="gothere()" type="button">
<!--SET up your links, and pass in the name of the group (ie: combo1) you wish to display for the link in question-->
<a href="javascript:populate(combo1)">Webmaster sites</a> | <a href="javascript:populate(combo2)">News sites</a> | <a href="javascript:populate(combo3)">Entertainment</a>
<p align="center">This free script provided by<br>
<a href="http://javascriptkit.com/">JavaScript
<script type="text/javascript" src="drop.js"></script>

01-31-2011, 09:38 PM
I guess that is something I should have tried but I never saw a script that works like that so I never thought it could work.

Thanks for your help azoomer


ps-how do the posts get mark as resolved?

01-31-2011, 10:53 PM
To mark a thread as resolved, edit your first post and use the dropdown menu to select "resolved".