onsubmit event causing problems with server control event 
Author Message
 onsubmit event causing problems with server control event

I am trying to avoid this scenario. A user hits the "Apply" button
several times before a post back, thus creating multiple entries in db.
I have tried this to disable the server buttons:

<script language=VBScript event=onsubmit for=frmMain>
frmMain.btnapplytop.disabled = true
frmMain.btnapply.disabled = true
frmMain.btnOKtop.disabled = true
frmMain.btnOK.disabled = true
frmMain.btncanceltop.disabled = true
frmMain.btncancel.disabled = true
frmMain.submit()
</script>

This works but unfortunately now the server control event is not being
fired and nothing is being saved to the db. I hope I was clear in
explaining my problem. Thanks in advance.

*** Sent via Developersdex http://www.*-*-*.com/ ***
Don't just participate in USENET...get rewarded for it!



Sat, 16 Oct 2004 02:43:11 GMT  
 onsubmit event causing problems with server control event
disabled form elements don't pass data.

Atrax - MVP [Microsoft Most Valued Professional]

http://www.infinitemonkeys.ws/

Host with me for $100 a year!
http://www.atrax.ws/hosting/

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Sat, 16 Oct 2004 14:31:01 GMT  
 onsubmit event causing problems with server control event

Thanks, that is what I figured. I was able to solve using the window
onbeforeunload event.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Sat, 16 Oct 2004 22:19:19 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Control Event Problem (Post Event after an event is fired)

2. VBScript : OnSubmit Event

3. Dereferencing out of process server object causes exception error when using events

4. Call client events from server side events

5. Problem: Resetting ListIndex Property Causes Click Event

6. ActiveX control causing subform's load event not to fire

7. VB6: Referencing Control from other form causes load event

8. User Control Validate Event causing Invalid Page Fault (SP5)

9. Which control caused Validate event?

10. OnSubmit() Event!

11. Accessing form element in the event handler OnSubmit

12. OnSubmit event?

 

 
Powered by phpBB® Forum Software