# Help on confirm message!

**URL:** <https://forum.kirupa.com/t/help-on-confirm-message/260238>\
**Category:** flash\
**Created:** [May 13, 2008, 6:44pm UTC](https://forum.kirupa.com/t/help-on-confirm-message/260238 "2008-05-13T18:44:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tengngan](https://avatars.discourse-cdn.com/v4/letter/t/97f17d/32.png) [@tengngan](https://forum.kirupa.com/u/tengngan)\
**Post date:** [May 13, 2008, 6:44pm UTC](https://forum.kirupa.com/t/help-on-confirm-message/260238/1 "2008-05-13T18:44:12Z")

</div>

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:

```auto
 
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

---

<div class="post-metadata">

**Author:** ![project107](https://avatars.discourse-cdn.com/v4/letter/p/eada6e/32.png) [@project107](https://forum.kirupa.com/u/project107)\
**Post date:** [May 16, 2008, 9:52pm UTC](https://forum.kirupa.com/t/help-on-confirm-message/260238/2 "2008-05-16T21:52:38Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Pier25](https://avatars.discourse-cdn.com/v4/letter/p/4af34b/32.png) [@Pier25](https://forum.kirupa.com/u/Pier25)\
**Post date:** [May 17, 2008, 10:28am UTC](https://forum.kirupa.com/t/help-on-confirm-message/260238/3 "2008-05-17T10:28:54Z")

</div>

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.
