message boxes

  • Thread starter Thread starter Mike P
  • Start date Start date
M

Mike P

I want to do a redirect to another page which is conditional on the user
clicking OK or Cancel on a message box. Can anybody tell me how do
bring up the message box and then write some code to respond to the
users input?


Any help would be really appreciated.


Cheers,

Mike
 
Mike,

This is really a javascript issue (or a VBScript issue) depending on the
language you're using to call your message box.

In Javascript, you'd use something like:

<button onClick="document.location.href=(confirm('Your Message') ?
'http://www.OkWasClicked.com' :
'http://www.CancelWasClicked.com')">Yup</button>

How you put this into your app is up to you.

Regards,
Anth
 
Mike,

If what you want is a way for a user to confirm or cancel a button click's
action you definitely need to use javascript.

If you want a quck way to do so I've made a javascript component for v1.1 of
..NET that you can drop on a page and then make easy use of many common
javascripts it has inside including a confirmation dialog that can be
attached to a button like you need.

The component is free and its entire project and a help file are available
on my web site, www.aboutfortunate.com. Click on the Code Library link and
then click the Javascript button in the menu on the left.


--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
 
Back
Top