What I want to do, is that, when the user select one option out of many from the dropdown box some new fields appears.
I was so close to make it ?, using this example:
[code]
<script type=”text/javascript”>
function showInfo()
{
var elem = document.getElementById(‘verify’);
if(document.forms[0].menu.value == “verify”){
elem.style.display=”inline”;}
else{
elem.style.display=”none”;}
}
</script>
</head>
<body>
<form action=”#” method=”post”>
<select name=”menu” onchange=”showInfo()”>
<option value=”none”>Select an option</option>
<option value=”email”>Email</option>
<option value=”verify”>Verify</option>
</select>
<div id=”verify” style=”display:none;”>
<input type=”text” value=”Username” >
<input type=”password” value=”password” >
</div>
</form>
But what I do want, is that two differen things appear on the page and in the different location of the page. And this script does not read the second <div>. ? So the result is, that the only first <div> appears.
Here are some images of what I want to do.
Before:
[url]http://img82.imageshack.us/img82/7093/beforens9.jpg
After
[url]http://img246.imageshack.us/img246/2759/afterzh2.jpg
So can someone help me with this script?? Please! I am pritty noob to the javascript. ?