Brett -
Here's the problem: Different browsers handle that
differently. Firefox 2+ won't reset the fields on Reload, only on
Shift-Reload. IE 6.0+ resets on a simple Refresh. What is the teacher using?
At 11:34 AM 11/13/2008, you wrote:
To Andrew:
What I am trying to do is get a form field to reset a value back to
the default selected when a user clicks on the refresh or reload
button in the browser, not the page (meaning I am not using <input
type="reset" /> to reset the fields). So, for example, lets say this code is:
<form action="processorformquantity.pl" name="heartSearch">
<select name="hsQty" id="hsQty" onchange="proc()">
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
<br /><input type="submit" value="Submit" />
</form>
As you see the code above displayed in the browser, 0 will
automatically be shown in the dropdown box (let's call it the
default#). But, if the user changes the default# to let's say 2, and
then decides to reset the page for whatever reason using the
browser's default refresh or reload button, the user-selected 2,
will change back to default# (or 0).
The reason is because for some reason, unknown to me, it is a major
part of my grade.
On Thu, Nov 13, 2008 at 12:00 PM, Todd Budnikas
<<mailto:[EMAIL PROTECTED]>[EMAIL PROTECTED]> wrote:
I guess use onbeforeunload to trigger an event?
<http://www.4guysfromrolla.com/demos/OnBeforeUnloadDemo1.htm>http://www.4guysfromrolla.com/demos/OnBeforeUnloadDemo1.htm
On Nov 13, 2008, at 11:40 AM, Brett Patterson wrote:
The Reload Current Page button in Firefox, and I think the Refresh
Page button in IE, and whatever those buttons are called in other
browsers. NOT with an input button to reset. Thanks.
On Thu, Nov 13, 2008 at 11:31 AM, Todd Budnikas
<<mailto:[EMAIL PROTECTED]>[EMAIL PROTECTED]> wrote:
Do you just mean a form reset input button? <input type="reset"
value="Reset!">? You lost me on the "but instead using the
browser's button.. what button?
How do I get a form field to reset itself back to its default
value if the user has changed it?
Without clicking on a refresh/reload button on the page but
instead using the browser's button.
The XHTML Transitional code I have is:
<td><div class="inmiddleof">
<label for="hsQty"></label>
<form action="" name="heartSearch">
<select name="hsQty" id="hsQty" onchange="proc()">
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
</form>
</div></td>
<td><div class="inmiddleof">
<form action="" name="hSearchoutput">
<input type="text" name="hsTotal" id="hsTotal" />
</form>
</div></td>
*******************************************************************
List Guidelines:
<http://webstandardsgroup.org/mail/guidelines.cfm>http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe:
<http://webstandardsgroup.org/join/unsubscribe.cfm>http://webstandardsgroup.org/join/unsubscribe.cfm
Help:
<mailto:[EMAIL PROTECTED]>[EMAIL PROTECTED]
*******************************************************************
--
Brett P.
*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************
Tom ('Mas) Pickering - Web Developer & Patti Gray - Web Designer
[EMAIL PROTECTED] & [EMAIL PROTECTED]
PourHouse Productions - http://pourhouse.com/
When He Reigns - It Pours <)><
*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************