Solved

message box?

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Materializecss - Different Behaviors in Browser's 1 36
CSS: Making responsive table look nicer 7 27
How do I pull the base url for use in html links 7 23
Else condition 9 19
Showing your events from Google Calendar in Google Maps Why? I travel all week and I thought it would be ideal if staff in office knew where I was based on my calendar. (OK real reason: my son wanted to see where I would be working, and I thoug…
This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

778 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