Solved

message box?

Posted on 1999-01-06
3
141 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

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

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

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
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 transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…

695 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