• 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

Any other way for Customize confirmation alert Msg Box??(Mr. Al Ian)

 
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 :-
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();
if( itemBig ) itemBig.style.visibility = "hidden";
if( isGameOverId )clearInterval(isGameOverId);
}
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
Sorry have been busy as can be and have not looked at the code you sent me.
For the alert, you just need to call the function inside of your code. I will look at your code tonight after I get off of work.
 
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,
I called the function inside my code and it is working fine but iam facing problem with the variable "score" in this variable the score of game is stored.And I want to show the score with the msg.For showing msg with the score of game I tried with ur code like below But it is taking the score as a string.Can u plz tell how I can show the score with the above msg which is stored in "var agree" in "confirmation alert msg box":-
<td width="392" height="105">
<p align="center"><font color="Black">I WANT TO WRITE THE CODE HERE...</font></p></td>
I have sloved that problem for which I have sent u my codes in ur pvt account.
Thanks
Bikash
[ October 07, 2002: Message edited by: Bikash Paul ]
 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am assuming this code is in a pop-up window. The value of the variable "score" can be access from the parent window with the following code:
self.opener.parent.document.forms[0].score.value
forms[0] assumes that there is only one form in the parent window.
Hope that works.
reply
    Bookmark Topic Watch Topic
  • New Topic