• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Yes or No Confirmation alert Msg Box??

 
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
you can not change the properties of a confirm box
 
Bikash Paul
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic