Message Box At Any Time

B

Ben

Hello,

I am trying to convert a windows app to a web app and I have come accross a
problem I was hoping someone could help with.

Im creating a page where the user inputs some values and presses 'submit'.
I have the code done for the click even of the submit button, however I need
to create a message box with 2 buttons. These buttons will be used to
redirect the user to another page based on which button was pressed. I need
the message box to return a value so that I could determine which button was
pressed.

How can I accomplish this? Thanks!
ben
 
E

Evertjan.

=?Utf-8?B?QmVu?= wrote on 24 mrt 2006 in
microsoft.public.inetserver.asp.general:
I am trying to convert a windows app to a web app and I have come
accross a problem I was hoping someone could help with.

Im creating a page where the user inputs some values and presses
'submit'. I have the code done for the click even of the submit
button, however I need to create a message box with 2 buttons. These
buttons will be used to redirect the user to another page based on
which button was pressed. I need the message box to return a value so
that I could determine which button was pressed.

How can I accomplish this? Thanks!

Not with ASP, because ASP is serverside and you would not want your box to
appear on the server's monitor, if there is one?

Clientside depends on the clientside scripting language and is off-topic on
this ASP NG.

==================================

btw, but please follow up on a clientside javascript NG:

<form onsubmit='return confirm("Sure?")'>
 
R

Ray Costanzo [MVP]

Windows apps and Web apps are incredibly different from each other. Without
deviating into the world of client-side VBScript, which you should never do,
you have to stick with what is available in the world of Web browsers. That
is to use client-side Javascript. Your options are "confirm" and "alert".
Confirm gives "OK" and "Cancel," in most, if not all, browser, and "alert"
just gives an OK button.


You could do something weak like:
<script type="text/javascript">
if(confirm('Click OK to go to location 1. Click cancel to go to location
2')) {
location.href = 'page1.asp';
} else {
location.href = 'page2.asp';
}
</script>


Or, create a new Web page that has two buttons or links or whatever on them
and make them say whatever you want and take the person wherever you like.

Ray at work
 

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

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,170
Latest member
Andrew1609
Top