By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,729 Members | 1,343 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,729 IT Pros & Developers. It's quick & easy.

Why does n't I get the selected value ?

P: n/a
Hi,

The following does not work (I get nothing in the input box) :

<html>
<head>
<script type="text/javascript" language=javascript">

function afficher()
{
var idselection=window.document.truc.ma_combo;
var indexselection=idselection.selectedIndex;
var selectionenclair =idselection.options[indexselection].value;
window.document.truc.sel.value=selectionenclair;

}

</script>
</head>
<body>
<form name="truc">
<select name="ma_combo" size=1>
<option value="one" selected>one
<option value="two">two
<option value="three">three
</select>
<br>
<input type="text" name="sel" value="" size=10>
<br>
<input type="button" value="Afficher" onClick="afficher(" ")">
</form>
</body>
</html>

Why ????

Thanks.
Dec 8 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi,
You cannot nest quotes within quotes in HTML.


Thanks. It works fine now.
Dec 8 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.