tonyeveland
09-27-2002, 09:45 PM
1. In my HTML, I have these two forms:
<form name="form1" method="post" action="">Code
<input name="SurveyStyleDisplay" value='none selected' type="text" size="15" maxlength="30">
</form>
<form name="form2" method="post" action="">Get Code
<input type="submit" name="Submit" value="Submit" onClick=GetStyle()>
</form>
2. And I have this function
function GetStyle()
{
form1.SurveyStyleDisplay.value = 'H1ABCDEFGH'
alert(form1.SurveyStyleDisplay.value)
}
3. When "FORM2" button is clicked, the .VALUE changes to 'H1ABCDEFGH' as the ALERT shows,
and as I can see on the screen, but then when I click OK on the ALERT, the .value
goes back to what is was.
WHY?
<form name="form1" method="post" action="">Code
<input name="SurveyStyleDisplay" value='none selected' type="text" size="15" maxlength="30">
</form>
<form name="form2" method="post" action="">Get Code
<input type="submit" name="Submit" value="Submit" onClick=GetStyle()>
</form>
2. And I have this function
function GetStyle()
{
form1.SurveyStyleDisplay.value = 'H1ABCDEFGH'
alert(form1.SurveyStyleDisplay.value)
}
3. When "FORM2" button is clicked, the .VALUE changes to 'H1ABCDEFGH' as the ALERT shows,
and as I can see on the screen, but then when I click OK on the ALERT, the .value
goes back to what is was.
WHY?