[WSG] Reset form fields to default values when user clicks the refresh/reload button in there Browser, not on the page.
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*: tddiv class=inmiddleof label for=hsQty/label form action= name=heartSearch select name=hsQty id=hsQty onchange=proc() option value=00/option option value=11/option option value=22/option option value=33/option /select /form /div/td tddiv class=inmiddleof form action= name=hSearchoutput input type=text name=hsTotal id=hsTotal / /form /div/td -- Brett P. *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***
Re: [WSG] Reset form fields to default values when user clicks the refresh/reload button in there Browser, not on the page.
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? On Nov 13, 2008, at 11:00 AM, Brett Patterson wrote: 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: tddiv class=inmiddleof label for=hsQty/label form action= name=heartSearch select name=hsQty id=hsQty onchange=proc() option value=00/option option value=11/option option value=22/option option value=33/option /select /form /div/td tddiv class=inmiddleof form action= name=hSearchoutput input type=text name=hsTotal id=hsTotal / /form /div/td *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***
Re: [WSG] Reset form fields to default values when user clicks the refresh/reload button in there Browser, not on the page.
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 [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? On Nov 13, 2008, at 11:00 AM, Brett Patterson wrote: 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*: tddiv class=inmiddleof label for=hsQty/label form action= name=heartSearch select name=hsQty id=hsQty onchange=proc() option value=00/option option value=11/option option value=22/option option value=33/option /select /form /div/td tddiv class=inmiddleof form action= name=hSearchoutput input type=text name=hsTotal id=hsTotal / /form /div/td *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] *** -- Brett P. *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***
Re: [WSG] Reset form fields to default values when user clicks the refresh/reload button in there Browser, not on the page.
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 [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? On Nov 13, 2008, at 11:00 AM, Brett Patterson wrote: 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*: tddiv class=inmiddleof label for=hsQty/label form action= name=heartSearch select name=hsQty id=hsQty onchange=proc() option value=00/option option value=11/option option value=22/option option value=33/option /select /form /div/td tddiv class=inmiddleof form action= name=hSearchoutput input type=text name=hsTotal id=hsTotal / /form /div/td *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] *** -- Brett P. *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***
Re: [WSG] Reset form fields to default values when user clicks the refresh/reload button in there Browser, not on the page.
On Nov 13, 2008, at 11:40 AM, Brett Patterson wrote: How do I get a form field to reset itself back to its default value if the user has changed it? I think it might help getting an answer if you could clarify exactly what it is you are trying to achieve here, and why. Andrew 352.870.6661 www.andrewmaben.net [EMAIL PROTECTED] In a well designed user interface, the user should not need instructions. *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***
Re: [WSG] Reset form fields to default values when user clicks the refresh/reload button in there Browser, not on the page.
I guess use onbeforeunload to trigger an event? 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 [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: tddiv class=inmiddleof label for=hsQty/label form action= name=heartSearch select name=hsQty id=hsQty onchange=proc() option value=00/option option value=11/option option value=22/option option value=33/option /select /form /div/td tddiv class=inmiddleof form action= name=hSearchoutput input type=text name=hsTotal id=hsTotal / /form /div/td *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***
Re: [WSG] Reset form fields to default values when user clicks the refresh/reload button in there Browser, not on the page.
Brett Patterson 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=00/option option value=11/option option value=22/option option value=33/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). For a select element you can add the attribute selected=selected the the option you want set by default. As for text inputs, you can just use value=Some Default Text in the input and that will show when the page loads, or is reloaded. HTH -Matt *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***
Re: [WSG] Reset form fields to default values when user clicks the refresh/reload button in there Browser, not on the page.
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=00/option option value=11/option option value=22/option option value=33/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 [EMAIL PROTECTED]wrote: I guess use onbeforeunload to trigger an event? 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 [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*: tddiv class=inmiddleof label for=hsQty/label form action= name=heartSearch select name=hsQty id=hsQty onchange=proc() option value=00/option option value=11/option option value=22/option option value=33/option /select /form /div/td tddiv class=inmiddleof form action= name=hSearchoutput input type=text name=hsTotal id=hsTotal / /form /div/td *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] *** -- Brett P. *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***
Re: [WSG] Reset form fields to default values when user clicks the refresh/reload button in there Browser, not on the page.
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=00/option option value=11/option option value=22/option option value=33/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.htmhttp://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: tddiv class=inmiddleof label for=hsQty/label form action= name=heartSearch select name=hsQty id=hsQty onchange=proc() option value=00/option option value=11/option option value=22/option option value=33/option /select /form /div/td tddiv class=inmiddleof form action= name=hSearchoutput input type=text name=hsTotal id=hsTotal / /form /div/td *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfmhttp://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfmhttp://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] ***
Re: [WSG] Reset form fields to default values when user clicks the refresh/reload button in there Browser, not on the page.
sorry all, does this not solve it? I guess use onbeforeunload to trigger an event? http://www.4guysfromrolla.com/demos/OnBeforeUnloadDemo1.htm On Nov 13, 2008, at 1:11 PM, Tom ('Mas) Pickering wrote: 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=00/option option value=11/option option value=22/option option value=33/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 [EMAIL PROTECTED] wrote: I guess use onbeforeunload to trigger an event? http://www.4guysfromrolla.com/demos/OnBeforeUnloadDemo1.htm *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***
Re: [WSG] Reset form fields to default values when user clicks the refresh/reload button in there Browser, not on the page.
Sorry, but no. If you look in FF3 it keeps the text entered in the form field when page is refreshed the same. It does not remove it. There are no code examples, and I have exhausted the library and internet resources. On Thu, Nov 13, 2008 at 1:20 PM, Todd Budnikas [EMAIL PROTECTED]wrote: sorry all, does this not solve it? I guess use onbeforeunload to trigger an event? http://www.4guysfromrolla.com/demos/OnBeforeUnloadDemo1.htm On Nov 13, 2008, at 1:11 PM, Tom ('Mas) Pickering wrote: 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=00/option option value=11/option option value=22/option option value=33/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 [EMAIL PROTECTED] wrote: I guess use onbeforeunload to trigger an event? http://www.4guysfromrolla.com/demos/OnBeforeUnloadDemo1.htm *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] *** -- Brett P. *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***
Re: [WSG] Reset form fields to default values when user clicks the refresh/reload button in there Browser, not on the page.
i realize that. I'm saying use this behavior to notice the page has been refreshed and call a function that resets the fields you wish to have this action. I'm not claiming that script solves your problem, but would be a gateway for you to write something that does. On Nov 13, 2008, at 1:32 PM, Brett Patterson wrote: Sorry, but no. If you look in FF3 it keeps the text entered in the form field when page is refreshed the same. It does not remove it. There are no code examples, and I have exhausted the library and internet resources. On Thu, Nov 13, 2008 at 1:20 PM, Todd Budnikas [EMAIL PROTECTED] wrote: sorry all, does this not solve it? I guess use onbeforeunload to trigger an event? http://www.4guysfromrolla.com/demos/OnBeforeUnloadDemo1.htm On Nov 13, 2008, at 1:11 PM, Tom ('Mas) Pickering wrote: 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=00/option option value=11/option option value=22/option option value=33/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. *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***
Re: [WSG] Reset form fields to default values when user clicks the refresh/reload button in there Browser, not on the page.
Ok, thanks. I'll try that. On Thu, Nov 13, 2008 at 1:40 PM, Todd Budnikas [EMAIL PROTECTED]wrote: i realize that. I'm saying use this behavior to notice the page has been refreshed and call a function that resets the fields you wish to have this action. I'm not claiming that script solves your problem, but would be a gateway for you to write something that does. On Nov 13, 2008, at 1:32 PM, Brett Patterson wrote: Sorry, but no. If you look in FF3 it keeps the text entered in the form field when page is refreshed the same. It does not remove it. There are no code examples, and I have exhausted the library and internet resources. On Thu, Nov 13, 2008 at 1:20 PM, Todd Budnikas [EMAIL PROTECTED]wrote: sorry all, does this not solve it? I guess use onbeforeunload to trigger an event? http://www.4guysfromrolla.com/demos/OnBeforeUnloadDemo1.htm On Nov 13, 2008, at 1:11 PM, Tom ('Mas) Pickering wrote: 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=00/option option value=11/option option value=22/option option value=33/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. *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] *** -- Brett P. *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***
Re: [WSG] Reset form fields to default values when user clicks the refresh/reload button in there Browser, not on the page.
On Nov 13, 2008, at 1:32 PM, Brett Patterson wrote: Sorry, but no. If you look in FF3 it keeps the text entered in the form field when page is refreshed the same. It does not remove it. There are no code examples, and I have exhausted the library and internet resources. Well, forgive me if I go into grumpy old fart mode here, but your problem is only tangentially related to Web Standards at best. And while I can be grudgingly appreciative of your initiative in submitting your school assignment here for an answer I think: A) You have actually already received in previous answers quite enough clues to work out your own answer B) If your teacher isn't utterly incompetent, he won't have set a task that he hasn't already either provided an answer to, or at least pointers to where to look for an answer. That said, I'm sure anyone here would be happy to review your eventual solution for standards compliance. Please take this in good part, and good luck, Andrew 352.870.6661 www.andrewmaben.net [EMAIL PROTECTED] In a well designed user interface, the user should not need instructions. *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***
Re: [WSG] Reset form fields to default values when user clicks the refresh/reload button in there Browser, not on the page.
Ah, ok, I got it figured out thanks. On Thu, Nov 13, 2008 at 1:53 PM, Andrew Maben [EMAIL PROTECTED]wrote: On Nov 13, 2008, at 1:32 PM, Brett Patterson wrote: Sorry, but no. If you look in FF3 it keeps the text entered in the form field when page is refreshed the same. It does not remove it. There are no code examples, and I have exhausted the library and internet resources. Well, forgive me if I go into grumpy old fart mode here, but your problem is only tangentially related to Web Standards at best. And while I can be grudgingly appreciative of your initiative in submitting your school assignment here for an answer I think: A) You have actually already received in previous answers quite enough clues to work out your own answer B) If your teacher isn't utterly incompetent, he won't have set a task that he hasn't already either provided an answer to, or at least pointers to where to look for an answer. That said, I'm sure anyone here would be happy to review your eventual solution for standards compliance. Please take this in good part, and good luck, Andrew 352.870.6661 www.andrewmaben.net [EMAIL PROTECTED] *In a well designed user interface, the user should not need instructions.* *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] *** -- Brett P. *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***
[WSG] Another Question about JavaScript.
I hate to ask another question about JavaScript, but I need help with ONE more thing, please? *Using the following JS code in XHTML Transitional:* function proc() { var num = document.heartSearch.hsQty.value*8.95; document.hSearchoutput.hsTotal.value = r2(num); } function prc2() { var num = document.youKnow.cutSandHours.value*12.17; document.outme.soter.value = r2(num); } function r2(n) { ans = n * 1000; ans = Math.round(ans /10) + ; while (ans.length 3) {ans = 0 + ans;} len = ans.length; ans = ans.substring(0,len-2) + . + ans.substring(len-2,len); return ans; } *and the following HTML code in XHTML Transitional:* div id=oklastone form action= name=heartSearch select name=hsQty id=hsQty onchange=proc() option value=00/option option value=33/option /select /form /div div id=otherrecal form action= name=hSearchoutput input type=text name=hsTotal id=hsTotal value=0.00 / /form /div div id=meinga form action= name=youKnow select name=cutSandHours id=cutSandHours onchange=prc2() option value=11/option option value=55/option option value=66/option /select /div div id=noca form action= name=outme input type=text name=soter id=soter value=0.00 / /form /div div id=costana form action= name=costAndTtl input type=text name=TtlCost / /form /div How would I get the last form to show the SUM of both the id=hsTotal and the id=soter text fields? -- Brett P. *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***
Re: [WSG] Another Question about JavaScript.
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm try http://www.google.com/search?q=javascript+helpsourceid=navclient-ffie=UTF-8rlz=1B3GGGL_enAU252AU254 the list is Web Standards not a help desk. Brett Patterson wrote: I hate to ask another question about JavaScript, but I need help with ONE more thing, please? *Using the following JS code in XHTML Transitional:* function proc() { var num = document.heartSearch.hsQty.value*8.95; document.hSearchoutput.hsTotal.value = r2(num); } function prc2() { var num = document.youKnow.cutSandHours.value*12.17; document.outme.soter.value = r2(num); } function r2(n) { ans = n * 1000; ans = Math.round(ans /10) + ; while (ans.length 3) {ans = 0 + ans;} len = ans.length; ans = ans.substring(0,len-2) + . + ans.substring(len-2,len); return ans; } *and the following HTML code in XHTML Transitional:* div id=oklastone form action= name=heartSearch select name=hsQty id=hsQty onchange=proc() option value=00/option option value=33/option /select /form /div div id=otherrecal form action= name=hSearchoutput input type=text name=hsTotal id=hsTotal value=0.00 / /form /div div id=meinga form action= name=youKnow select name=cutSandHours id=cutSandHours onchange=prc2() option value=11/option option value=55/option option value=66/option /select /div div id=noca form action= name=outme input type=text name=soter id=soter value=0.00 / /form /div div id=costana form action= name=costAndTtl input type=text name=TtlCost / /form /div How would I get the last form to show the SUM of both the id=hsTotal and the id=soter text fields? -- Brett P. *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] *** *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***
Re: [WSG] Another Question about JavaScript.
Hi Brett, you can use the document.forms[form number in sequence] to access the elements in a form *document.forms[0].elements[0].value *For further reference http://javascript.internet.com/forms/format-input.html* *Warm Regards Sajan Franco On Fri, Nov 14, 2008 at 9:02 AM, Luke Hoggett [EMAIL PROTECTED]wrote: List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm try http://www.google.com/search?q=javascript+helpsourceid=navclient-ffie=UTF-8rlz=1B3GGGL_enAU252AU254 the list is Web Standards not a help desk. Brett Patterson wrote: I hate to ask another question about JavaScript, but I need help with ONE more thing, please? *Using the following JS code in XHTML Transitional:* function proc() { var num = document.heartSearch.hsQty.value*8.95; document.hSearchoutput.hsTotal.value = r2(num); } function prc2() { var num = document.youKnow.cutSandHours.value*12.17; document.outme.soter.value = r2(num); } function r2(n) { ans = n * 1000; ans = Math.round(ans /10) + ; while (ans.length 3) {ans = 0 + ans;} len = ans.length; ans = ans.substring(0,len-2) + . + ans.substring(len-2,len); return ans; } *and the following HTML code in XHTML Transitional:* div id=oklastone form action= name=heartSearch select name=hsQty id=hsQty onchange=proc() option value=00/option option value=33/option /select /form /div div id=otherrecal form action= name=hSearchoutput input type=text name=hsTotal id=hsTotal value=0.00 / /form /div div id=meinga form action= name=youKnow select name=cutSandHours id=cutSandHours onchange=prc2() option value=11/option option value=55/option option value=66/option /select /div div id=noca form action= name=outme input type=text name=soter id=soter value=0.00 / /form /div div id=costana form action= name=costAndTtl input type=text name=TtlCost / /form /div How would I get the last form to show the SUM of both the id=hsTotal and the id=soter text fields? -- Brett P. *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] *** *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] *** *** List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm Help: [EMAIL PROTECTED] ***