Could someone please help on my javascript.
I have a page that allows someone to enter the contents of a box into a text box. The complicated thing is that it allows people to enter the greek symbols alpha, beta and gamma, which can appear anywhere in the text. I currently have 3 submit boxes, so when someone press the box for alpha it will be added to the end of the list for the symbol for alpha.
It works fine until the contents already has a a symbol in it. My question is how do I make it so it doesn't reformat the existing text.
Here some of my code for alpha:
function PriceUpdate(num, contents)
{
var fcontent = contents;
alert (fcontent);
document.update.contents.value += ' á';
}
<input type="button" name="alpha" onclick="javascriptriceUpdate(1, document.update.contents.value)" value="á">
<FONT face=Verdana size="2">
Contents: <br>
<input name="contents" type="text" size="50" value="#Contents#"><br>
</font>
I have a page that allows someone to enter the contents of a box into a text box. The complicated thing is that it allows people to enter the greek symbols alpha, beta and gamma, which can appear anywhere in the text. I currently have 3 submit boxes, so when someone press the box for alpha it will be added to the end of the list for the symbol for alpha.
It works fine until the contents already has a a symbol in it. My question is how do I make it so it doesn't reformat the existing text.
Here some of my code for alpha:
function PriceUpdate(num, contents)
{
var fcontent = contents;
alert (fcontent);
document.update.contents.value += ' á';
}
<input type="button" name="alpha" onclick="javascriptriceUpdate(1, document.update.contents.value)" value="á">
<FONT face=Verdana size="2">
Contents: <br>
<input name="contents" type="text" size="50" value="#Contents#"><br>
</font>