Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Whats wrong with this code? 1

Status
Not open for further replies.

DanielHowden

Technical User
Nov 12, 2010
2
GB
I want the inserted text to be under the droplist not on top of it!

<html>
<body>

<script type="text/javascript">
function showSelected(val)
{
document.getElementById('selectedResult').innerHTML="<a href='mailto:" + val + "'>" + val + "</a><p><font size=3></font>&nbsp;</p>"
}
</script>

<div id='selectedResult'></div>
<!-- This sets up the drop down list of names -->
<select name='test' onChange='showSelected(this.value)' ID=Select1>
<option value='user.1@email.net'>First User</option>
<option value='user.2@email.net'>Second User</option>
</select>

</body>
</html>
 
Your kidding right?

If you want it under it, place th3 div under it and not on top of it.

Code:
[blue] -<[/blue][red]<div id='selectedResult'></div>-[/red]
[blue]|[/blue] <!-- This sets up the drop down list of names -->
[blue]|[/blue]  <select name='test' onChange='showSelected(this.value)' ID=Select1>
[blue]|[/blue]  <option value='user.1@email.net'>First User</option>
[blue]|[/blue]  <option value='user.2@email.net'>Second User</option>
[blue]|[/blue]  </select>
[blue]|->[/blue][red]Div here[/red]




----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Behind the Web, Tips and Tricks for Web Development.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top