Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get a dialogue box eg.. OK CANCEL

Status
Not open for further replies.

LucyL

Technical User
Feb 20, 2002
113
0
0
US
Hi,
I have a LOGOUT link that when clicked I want to open a dialogue box which asks the user if they are sure they want to exit, and they are given the options of OK or Cancel. Can you do this using javascript? I'm not sure how to do this - any ideas?
Thank you.
 
Yes using the confirm command:

confirm ('Are you sure you want to exit?');

- VB Rookie
 
Code:
<a href="logout.php" onclick="return(confirm('Are you sure you wish to logout?'));">Logout</a>

<marc> i wonder what will happen if i press this...[ul][li]please tell us if our suggestion has helped[/li][li]need some help? faq581-3339[/li][/ul]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top