Help on confirm message!

Hi everyone,

I creating a banner with a linking to another page but i would like to add a confirm message in so user will get the confirmation before link to another page.

below is my coding:

 
bg.onRelease = function() {
    var brMSG = "Please click on OK to direct to the Yahoo site, or CANCEL to continue loading this page.";
    getURL("javascript: confirm(" + brMSG + ")", "");
    if (answer = true)
       getURL("[http://www.yahoo.com](http://www.yahoo.com/)", "_blank");
    else
};

My problem is when i click on the banner confirm message and the new page both showing at the same time. Can someone help me on this?

THANKS
tengngan

variable = foo // reads variable equals foo
variable == foo // reads variable is equal to foo

I don’t think that will work anyway…

Tell me, how can flash know you have pressed the alert on JS?
Are you passing the answer var to flash somehow?

Even if you are, the user would have to click 2 times for that code to work.

IMO You can do:

  • make the confirmation inside flash, and when you press the ok you getURL

or

  • change the url in JS, not in flash.