View Full Version : Regarding Element adding via select box

09-04-2007, 11:15 PM
Today I have been trying to write a simple script. With selecting a certain "Option" via the Select Box, I'm trying to make the second Select Box correspond to the first. Sounds simple enough, though I'm finding some difficulties.

Here is the basic:


<meta name="robots" content="noindex,nofollow" />
<style type="text/css">

<script type="text/javascript">
fuction country()
var country;
var a=document.getElementById("us");
var b=document.getElementById("can");
var c=document.getElementById("misc");

if (country==a) document.write("<select><option>New

else if (country==b) document.write("<select><option>New

else (country==c) document.write("<select><option>England</option><option>France</option<option>China</option></select>");

<option id="us" onselect="country()">United States</option>
<option id="can" onselect="country()">Canada</option>
<option id="misc" onselect="country()">Other</option>



Many thanks in advance for any suggestions correcting my errors.

09-05-2007, 03:03 AM
Java != javascript. Moved ^^

09-05-2007, 04:24 AM
I think I already answered this question here?: http://codingforums.com/showthread.php?t=122977


09-05-2007, 04:39 AM

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum