help with onChange document.write
Posted: Mon May 03, 2010 12:19 pm
Hey all, i'm getting to grips with php but have a small javascript problem. I have a form below and need a little help adding an onChange=document.write for the dropdown box. I have added in the code where I want what values but am unsure as to how to implement it.
Can anyone give me some advice on how to achieve this please? 
Thanks all
Code: Select all
<form action="?0&posts=5" method="post">
Update: <select name="color">
<option value="blue">Text Colour</option>
<option value="blue">Default</option>
<option value="red">Red</option>
<option value="green">Green</option>
<option value="purple">Purple</option>
<option value="orange">Orange</option>
<option value="yellow">Yellow</option>
<option value="brown">Brown</option>
<option value="black">Black</option>
</select>
//here I would like <font color="selected option value"> and by default <font color="blue"> //
<input type="text" name="update" value="Update text here...">
</font>
<input type="submit" name="upst" value="Update">
</form> Thanks all