Not Doing Postback

B

blue

When the user clicks a button on my form, I disable the page
(document.body.disabled = true;) so they can't submit the form multiple
times before the postback occurs. When I do this, it doesn't post back at
all. I also tried just disabling the button itself (btn.disabled = true;)
and that also causes it to not post back.

Is there a way to disable the page and have a postback?

Thanks,

blue
 
C

Cowboy \(Gregory A. Beamer\)

The mechanism of postback is driven by client side script. If you disable
the page, postback will never occur, unless you create your own handler (ie,
check and see if it is x dropdown, button, et al) and submit.

I would guess you need to rethink the problem rather than disable the page.
It sounds like validation, or similar, is the real issue. Think through the
use case (you do have use cases?) step by step and figure out what actions
can and cannot happen at each step. You can then build the page to fit these
conditions.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

**********************************************************************
Think Outside the Box!
**********************************************************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top