create a Popup

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hey everybody... (hey dr. nick!),

i have a large form and i want people to be able to reset it. i dont,
however, want people to accidentally click the reset button. is it possible
for a very small popup to open and ask if they want to clear the form? is
this possible without being blocked by a popup blocker?
thanks in advance
--
Look Out!

Helter Skelter
Yellow Submarine
Pepperland

PS. Get Back!
 
hey everybody... (hey dr. nick!),
i have a large form and i want people to be able to reset it. i dont,
however, want people to accidentally click the reset button. is it possible
for a very small popup to open and ask if they want to clear the form? is
this possible without being blocked by a popup blocker?
thanks in advance

In the button's onclick (the *client side* onclick - you need to set it
through the Attributes collection), use this:

if (!confirm('Really reset?')) return false;

some notes:
- don't shorten it to "return confirm('..')", you do *not* want to
return yet if it's ok, because ASP.Net can add it's own javascript
after this (fire validators, start postback)
- don't forget the final ; as this will separate your code from the
auto-generated following code.

Hans Kesting
 

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

Similar Threads

Feedback form 1
Querystring 6
SmtpException with email form 4
Image Based Website 2
web search 6
QueryString 2
Email Form in ASP.NET 4
Creating a new instance of a class 2

Back
Top