Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / February 2006

Tip: Looking for answers? Try searching our database.

create a Popup

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Helter Skelter - 16 Feb 2006 11:55 GMT
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
Signature

Look Out!

Helter Skelter
Yellow Submarine
Pepperland

PS. Get Back!

Mark Rae - 16 Feb 2006 13:02 GMT
> 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

You can do this client-side with the JavaScript confirm() method:
http://www.google.com/search?sourceid=navclient&ie=UTF-8&rls=GGLG,GGLG:2005-48,G
GLG:en&q=JavaScript+confirm

Hans Kesting - 16 Feb 2006 13:14 GMT
> hey everybody... (hey dr. nick!),
>
[quoted text clipped - 3 lines]
> 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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.