It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming JavaScript Forum

Calling a function after Reset.

Calling a function after Reset.

Postby lueydueyhuey on Mon Jan 12, 2009 11:22 am

I have made a form with submit and reset buttons.
When i press the reset button automatically all fields get reset. But behaviour of some of my fields behave on the values of others. so the problem is that when a particular field gets reset , it does not triggers a change of state on other fields which depend on it.

I tried using onReset and onClick , but both of them tend to invoke my methods before doing the actual reset. so the state after reset is not modified. Is there any way i can link my method with reset button but cause it to be invoked after reset actually happens.

or else, as by doing a reset the browser resets the values to origninal. Is there a way in javascript to get the original values. If i get them, then also my purpose will be solved.

Thanks in advance.
lueydueyhuey
 
Posts: 0
Joined: Mon Jan 12, 2009 11:10 am

Re: Calling a function after Reset.

Postby palme on Sun Jan 25, 2009 7:14 pm

that's a very interested question, i have not solution, but i know that Reset button have 3 event onclick, onblur, onfocus, and i think , may be onblur can be used for your need, good luck
palme
 
Posts: 37
Joined: Wed Aug 06, 2008 9:18 pm

Re: Calling a function after Reset.

Postby rangana on Mon Jan 26, 2009 6:48 am

Have you tried to get the element's value during the onclick event of your reset.

Save it in a global variable, or for safety, in an available method of a global object.

I'm not totally sure what you're trying to do, but if you could show us the markup and code as to where you're stumped, then we might be able to undestand better what you're trying to do.
User avatar
rangana
500+ Club
 
Posts: 935
Joined: Wed Feb 27, 2008 5:14 am
Location: Cebu City Philippines

Re: Calling a function after Reset.

Postby Suffer on Mon Jan 26, 2009 7:09 am

palme wrote:that's a very interested question, i have not solution, but i know that Reset button have 3 event onclick, onblur, onfocus, and i think , may be onblur can be used for your need, good luck


i totatlly agree with palme 8)
Suffer
100+ Club
 
Posts: 236
Joined: Tue Jan 20, 2009 6:34 am

Re: Calling a function after Reset.

Postby rangana on Mon Jan 26, 2009 1:08 pm

Hi Suffer,

I mean not to be a party-pooper, but which argument did you agree?

Also, I don't think that saying you agree is worth a post - might be better of consider as spam.
User avatar
rangana
500+ Club
 
Posts: 935
Joined: Wed Feb 27, 2008 5:14 am
Location: Cebu City Philippines

Re: Calling a function after Reset.

Postby Johnathan on Mon Jan 26, 2009 9:48 pm

i totatlly agree with rangana 8)
Last edited by Johnathan on Mon Jan 26, 2009 9:56 pm, edited 2 times in total.
Johnathan
1000+ Club
 
Posts: 1207
Joined: Thu May 31, 2007 3:28 pm
Location: Belfast, Northen Ireland

Re: Calling a function after Reset.

Postby Tomi on Mon Jan 26, 2009 9:51 pm

i totatlly agree with johnathan 8)
User avatar
Tomi
500+ Club
 
Posts: 925
Joined: Mon Jun 26, 2006 6:51 pm
Location: Essex, England

Re: Calling a function after Reset.

Postby flabbyrabbit on Mon Jan 26, 2009 9:56 pm

i totatlly agree with tomi 8)
Image
User avatar
flabbyrabbit
500+ Club
 
Posts: 706
Joined: Thu Jan 25, 2007 1:10 pm
Location: Midlands, England

Re: Calling a function after Reset.

Postby blackburnman04 on Mon Jan 26, 2009 10:04 pm

i totatlly agree with flabbyrabbit 8)
blackburnman04
 
Posts: 1
Joined: Tue Jul 15, 2008 6:50 pm
Location: NI

Re: Calling a function after Reset.

Postby Etheryte on Mon Jan 26, 2009 10:50 pm

i totally agree with blackburnman04 8)
Image
User avatar
Etheryte
250+ Club
 
Posts: 255
Joined: Sun Mar 16, 2008 12:21 pm

Next

Who is online

Users browsing this forum: No registered users and 3 guests