Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 144
  • Last Modified:

message box?

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
scorp010699
Asked:
scorp010699
  • 2
1 Solution
 
seahpcCommented:
Try this :

<Script Language = "Javascript">
reply = confirm("Are You Sure ?")
if (reply = true)
       // something  
else
       // something
</Script>
0
 
scorp010699Author Commented:
what would go in the fields where you put "something" & something else???
0
 
seahpcCommented:
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now