File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes window with yes and no Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "window with yes and no" Watch "window with yes and no" New topic
Author

window with yes and no

sruthi reddy
Ranch Hand

Joined: Aug 03, 2008
Posts: 34
Hi
I have a situation where on click of a link in a jsp, a pop up window sholud open with title "are you want to go" and with two buttons yes and no.On yes, a other jsp will open and on no another jsp.Can anyone suggest me how to do this either using java or javascript.
Thanks
Sruthi
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Only option you would have is to use layers [divs] to pop up a box that looks like a dialog. You can not chnage any features of alert/confirm to make it look different.

Eric
vk jain
Greenhorn

Joined: Oct 05, 2007
Posts: 21
You can use following code

if( confirm("do you ........") )
{
//call other jsp
}
else
{
//call another jsp
}
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60999
    
  65

Originally posted by vk jain:
You can use following code
Not if the requirements are for the buttons to read "yes" and "no".


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: window with yes and no