Solved

message box?

Posted on 1999-01-06
3
140 Views
Last Modified: 2010-04-09
How would i go about making a popup message box for such things as a disclaimor with a "OK" and "CANCEL" button. When the person clicks ok the page will load up but if they click cancel they will be transported somewhere else.
0
Comment
Question by:scorp010699
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 2

Expert Comment

by:seahpc
ID: 1841387
Try this :

<Script Language = "Javascript">
reply = confirm("Are You Sure ?")
if (reply = true)
       // something  
else
       // something
</Script>
0
 

Author Comment

by:scorp010699
ID: 1841388
what would go in the fields where you put "something" & something else???
0
 
LVL 2

Accepted Solution

by:
seahpc earned 30 total points
ID: 1841389
Hope this is what you want :

<Script Language = "Javascript">
reply = confirm("Are You Sure ?")
if (reply = true)
       self.location = "1.htm" ;
else
       self.location = "2.htm" ;
</Script>

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Accordion won't close correctly 5 17
HTML INPUT 6 38
asp.net, radiobuttonlist, c# 3 68
output in HTML format powershell 6 48
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question