This is my code:
<script>
function colourformat(theform,colourformat,prompttext)
{
inserttext = prompt("\n<font style=\"color:"+colourformat+";\">xxx</font>",prompttext);
theform.about.value += "<font style=\"color:"+colourformat+";\">"+inserttext+"</font>";
}
</script>
<form action="admin.asp" method="post">
<select name="colour" onchange="colourformat(this.form,this.options[this.selectedIndex].value,'Type the text you want change the colour of.')">
<option value="black" style="color:black">black</option>
<option value="skyblue" style="color:skyblue">sky blue</option>
<option value="royalblue" style="color:royalblue">royal blue</option>
<option value="blue" style="color:blue">blue</option>
<option value="darkblue" style="color:darkblue">dark-blue</option>
<option value="orange" style="color
range">orange</option>
<option value="orangered" style="color
rangered">orange-red</option>
<option value="crimson" style="color:crimson">crimson</option>
<option value="red" style="color:red">red</option>
<option value="firebrick" style="color:firebrick">firebrick</option>
<option value="darkred" style="color:darkred">dark red</option>
<option value="green" style="color:green">green</option>
<option value="limegreen" style="color:limegreen">limegreen</option>
<option value="seagreen" style="color:seagreen">sea-green</option>
<option value="deeppink" style="color:deeppink">deeppink</option>
<option value="tomato" style="color:tomato">tomato</option>
<option value="coral" style="color:coral">coral</option>
<option value="purple" style="color
urple">purple</option>
<option value="indigo" style="color:indigo">indigo</option>
<option value="burlywood" style="color:burlywood">burlywood</option>
<option value="sandybrown" style="color:sandybrown">sandy brown</option>
<option value="sienna" style="color:sienna">sienna</option>
<option value="chocolate" style="color:chocolate">chocolate</option>
<option value="teal" style="color:teal">teal</option>
<option value="silver" style="color:silver">silver</option>
</select>
<br>
<textarea name="about" cols="75" rows="15"></textarea>
</form>
When the user selects a colour other than black there is a dialogue that asks for text. Then when they press ok it puts in the HTML and the text in to the textarea in the form.
Now: I what i want to do is when the user clicks ok on the dialogue the select form item returns to the black option and the form focus is set to the end of the textarea...
any ideas?
<script>
function colourformat(theform,colourformat,prompttext)
{
inserttext = prompt("\n<font style=\"color:"+colourformat+";\">xxx</font>",prompttext);
theform.about.value += "<font style=\"color:"+colourformat+";\">"+inserttext+"</font>";
}
</script>
<form action="admin.asp" method="post">
<select name="colour" onchange="colourformat(this.form,this.options[this.selectedIndex].value,'Type the text you want change the colour of.')">
<option value="black" style="color:black">black</option>
<option value="skyblue" style="color:skyblue">sky blue</option>
<option value="royalblue" style="color:royalblue">royal blue</option>
<option value="blue" style="color:blue">blue</option>
<option value="darkblue" style="color:darkblue">dark-blue</option>
<option value="orange" style="color

<option value="orangered" style="color

<option value="crimson" style="color:crimson">crimson</option>
<option value="red" style="color:red">red</option>
<option value="firebrick" style="color:firebrick">firebrick</option>
<option value="darkred" style="color:darkred">dark red</option>
<option value="green" style="color:green">green</option>
<option value="limegreen" style="color:limegreen">limegreen</option>
<option value="seagreen" style="color:seagreen">sea-green</option>
<option value="deeppink" style="color:deeppink">deeppink</option>
<option value="tomato" style="color:tomato">tomato</option>
<option value="coral" style="color:coral">coral</option>
<option value="purple" style="color

<option value="indigo" style="color:indigo">indigo</option>
<option value="burlywood" style="color:burlywood">burlywood</option>
<option value="sandybrown" style="color:sandybrown">sandy brown</option>
<option value="sienna" style="color:sienna">sienna</option>
<option value="chocolate" style="color:chocolate">chocolate</option>
<option value="teal" style="color:teal">teal</option>
<option value="silver" style="color:silver">silver</option>
</select>
<br>
<textarea name="about" cols="75" rows="15"></textarea>
</form>
When the user selects a colour other than black there is a dialogue that asks for text. Then when they press ok it puts in the HTML and the text in to the textarea in the form.
Now: I what i want to do is when the user clicks ok on the dialogue the select form item returns to the black option and the form focus is set to the end of the textarea...
any ideas?