aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Yes or No Confirmation alert Msg Box?? 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 "Yes or No Confirmation alert Msg Box??" Watch "Yes or No Confirmation alert Msg Box??" New topic
Author

Yes or No Confirmation alert Msg Box??

Bikash Paul
Ranch Hand

Joined: Dec 04, 2001
Posts: 342
Hi all friends,
I want to pop up a confirmation alert msg box with "Yes" or "No" button.If user click on "yes" it should go to previous page and in case of "No" button it should close the browser window.Now I have done this but with my code alert msg box showing "Ok" and "Cancel" button.I want "yes" and "No" button in place of "Ok" and "Cancel" button.Can any one plz guide me how I can slove this problem.Below r my codes:-
<script>
var agree=confirm("Game Over Your Total Score is " + score +" "+"Points"+"\n"+
"Do You Want To Play Again?"+"\n"+"(OK = Yes , Cancel = No)");
if (agree)
history.go(-1);
else
window.close();
</script>
Regards
Bikash
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
you can not change the properties of a confirm box
Bikash Paul
Ranch Hand

Joined: Dec 04, 2001
Posts: 342
Hi Al Ian,
Is there any other way to do that.Can u Plz tell me how can I use ur given code for'customize confirmation alert msg box' on ur site (http://www10.brinkster.com/A1ien51/Scripts/ConfirmBuilder.htm) in my programe coz I don't want to use on_click.In ur code U pop up 'confirmation alert msg box box' on 'on_click' event.I want to add it in my function without on_click event.Below r my codes:-
function isGameOver(){
for(var prop in itemZones){
if( itemZones[prop].item.style.visibility == "visible"){
return;
}
}
gameOver = true;
//I WANT TO ADD UR CODE HERE......
//NOW HERE I AM USING MY ABOVE CODES.
if( itemBig ) itemBig.style.visibility = "hidden";
if( isGameOverId )clearInterval(isGameOverId);
}
Regards
Bikash
[ October 04, 2002: Message edited by: Bikash Paul ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Yes or No Confirmation alert Msg Box??