Using navigateToURL and ExternalInterface.call triggering popup blocker

I have a button and a text field.  Clicking the button sends the text to a backend server where it does a profanity filter.  I'm using an event listener to get a response from the back end.  If there is no profanity, the swf does a navigateToURL.  Unfornetly the url request is blocked by many browsers.
When I skip the profanity filter and the navigateToURL is fired in the MouseEvent function then it doesn't get blocked.  I've read this is expected, it's a security feature.
Is it possible to put a function inside my MouseEvent function, or someway of getting a response from the server all inside the the MouseEvent function?
Thanks!

I had to change it to this to get it to work:
btn.addEventListener(MouseEvent.CLICK, buttonEvent);
btn.dispatchEvent(new MouseEvent("click"));
Thank for this Klad, I might have use for it someday, but you are right, it didn't trick the browser.

Similar Messages

  • So my I phone 4s volume has decided to pack  allowing only my phone to make sounds when I have an incoming call, I can also here fine using facetime and receiving calls. YouTube, soundcloud, any of I players will no longer play sound. I've restored the ph

    So my I phone 4s volume has decided to pack  allowing only my phone to make sounds when I have an incoming call, I can also here fine using facetime and receiving calls. YouTube, soundcloud, any of I players will no longer play sound. I've restored the phone using iTunes on my laptop and checked all the volumes are turned up and the button at the left hand Side of the phone is in the correct position.

    Try inserting and re-inserting your headphones 7 or 8 times. Also try cleaning out the headphone jack in case of debris that might be interfering with the connection/disconnection.

  • How to use "document.getElementById()" using MVC and  bsp:call

    I follow the tutorial from saptechnical .com about F4 in BSP and it works.
    But my problem, is that is not working in my BSP I get javascript error "document.getElementById() is null" the popup appear I select the value but when I press the button to close the popup and pass the value nothing appears.
    I think that is because im Using MVC and Views that call a controller (like view inside views).
    I have in my main.htm this:
    <htmlb:form id     = "search"
                   method = "get" >
            <bsp:call url     = "search.do"
                      comp_id = "search" >
            </bsp:call>
    </htmlb:form>
    The code with the help values is in the search.htm(this the page associated with controller search.do)
    So Im thinking that my problem is because the form isnt in the SAME page than my inputField  and that is why im getting that error.  Can be this true ?
    And if it is,  how can I solve it?, I have several pieces of page with controllers and If I try to put the form tag in each "piece" I get an error that a button was left without a parent form tag, and I there isnt any button tag without form tag. So I think that another element tray, tabstrip or something require form tag also.
    I hope that I could explain my problem and someone can give me a hand.
    Can It be that this js statement
    document.getElementById("i_VKORG_low").value = fval;
    only works only if the form tag is in the same htm page, and cause I have teh form tag declared in the main.htm and the fieldtext i_VKORH_low in search.htm it doesnt works ?
    Thx
    EDIT: I cant post my javascript source code...dont know why I get an error from the forum that the post is not supported

    Hello,
    If I remember well, the MVC framework adds the comp_id of the bsp_call to all elements in the subcontroller.
    Try using:
    document.getElementById("search_i_VKORG_low");
    Regards,
    Tanguy

  • How to accept 3rd party cookies and turn off my popup blocker?

    All of a sudden I can't get to where I want to go in Safari - the bank helper says to make sure my popup blocker is turned off and that my browser is accepting 3rd party cookies.
    I can't seem to get it done in my system preferences - thanks for any help -

    Open the Security and Privacy tabs of Safari's preferences(not System Preferences) and change the settings.
    (124220)

  • Hi i was using siri and now my ipad got block what should i do to unlock it?

    Hi i was using siri and my ipad got blocked what should i do?

    If it is the passcode then see here - http://support.apple.com/kb/HT1212
    You will have to go down the route of a Restore. Please read carefully the links therein with regard to using a different different computer from that with which you normally sync.
    [You may also have to put your device into Recovery Mode -  http://support.apple.com/kb/HT1808 ]

  • NavigateToURL() New Window Foiled by Popup Blocker

    Im currently using the following line of code to open a new
    window with the URL specified...
    navigateToURL(new URLRequest('
    http://www.mysite.com'),
    '_blank');
    However, pesky Internet Explorer is blocking the new window
    as a popup everytime - Is there a documented way to get around such
    an issue?

    I should have prefaced this better by saying the setup looks
    like this in its complete form...
    &amp;lt;mx:Canvas x=&amp;quot;10&amp;quot;
    y=&amp;quot;22&amp;quot;
    width=&amp;quot;220&amp;quot;
    height=&amp;quot;31&amp;quot;
    backgroundColor=&amp;quot;#ffffff&amp;quot;
    backgroundAlpha=&amp;quot;0.01&amp;quot;
    buttonMode=&amp;quot;true&amp;quot;
    click=&amp;quot;onLogoClick()&amp;quot;
    id=&amp;quot;canvas1&amp;quot;&amp;gt;&amp;lt;/mx:Canvas&amp;gt;
    Seems that the forum butchered my code, but very basically -
    Its a canvas item with a click event handler that executes the
    function below..
    private function onLogoClick():void {
    soundGlobal.play();
    navigateToURL(new URLRequest('
    http://www.mysite.com'),
    '_blank');
    I assume this should still work on the same premise of
    opening in response to a user click...

  • I recently sent a block email to various people at the same time but forgot to use bcc and my account has been blocked for spamming. How can I sort this out?

    I work on the telephones at work and when I cannot get an answer from a customer I send them an e-mail asking them to contact me back at the office (missed call message). However I sent it to multiple recipients as I was in a hurry and did not click the bcc option to hide the customers mail addresses from each other by accident. They then marked the e-mails as spam and now my office thunderbird sends e-mails out but my customers call me saying they have not received any of the e-mails they have requested from our office. I would like to know if there is any way I can rectify this matter as it was just simply a mistake and because of this my business is suffering.

    Talk to your email provider. They control their servers and what happens to your email.

  • Need to dynamically include an image file when calling a popup window

    I am working on a web dynpro Java app which uses a button to call a popup window/view. Within the popup, I want to dynamically choose an image to show (from mime types) based on a criteria...there will be multiple buttons on the initial view that all call the same popup, but the popup will have content specific to which button called it (specifically the image embedded in the view).
    My question is, what is the proper/best way to do this?
    Here are some possible ways I can think of...
    1. Pass a parameter from each button during the call of the event, but how does that get sent to the implementation of the second view for use in determining which image? And, how do I modify the source property of the image element based on that parameter?
    2. Create multiple pages and views for each button to call...but this seems decidedly un-DRY.
    3. Saw one posting on how to dynamically create a cached image...I could use different event handlers in the initial view, then load individual images from the mime library at that point...cache it into a hard-coded image name...then just call the identical view every time. Not sure this is even possible...input?
    I don't know specifically how to implement any of these options, or know if there are other/better ways. Any help would be appreciated.

    Just create a context attribute "imageFileName" in the component controller or a custom controller, map this attribute from both views (the one that contains the buttons and the one in the popup window that displays the image).
    Now you can have an separate action for each button or one common action. In the first case just set the "imageFileName" inside the action handler for the specific button. In the second case use an action parameter "buttonId" and a parameter mapping
    button.mappingOfOnAction().setParameter("buttonId", button.getId());
    to determine which button triggered the action. After having checked which button was pressed, set the "imageFileName" accordingly.
    Armin

  • Use navigateToURL to open a local pdf...

    I have a problem with the following code. I have been searching since yesterday for solutions to open pdfs in a browser window from within flash. I've found various forum posts about using navigateToURL and it looks like people have success. It seems very simple to do, but everytime I try to open the pdf file, i get a 404 error in the browser, which is going to this link:
    http://file.pdf (which obviously does not exist)
    My pdf file is sitting inside the same folder as the swf that's trying to launch it. Is there a way to use navigateToURL and specify that the file is local? Else, is there another way to open a pdf file from within a folder? Or am I just an idiot and am missing something very obvious?
    Thanks for any help,
    Chipleh
    Code:
    myBtn.addEventListener(MouseEvent.MOUSE_DOWN, openPDF);
    function openPDF(event:MouseEvent):void{
    var url:String = "file.pdf";
    var myRequest:URLRequest = new URLRequest(url);
    try {
      navigateToURL(myRequest, '_blank');
    catch (e:Error) {
      trace("Error occurred!");

    Hakan KIRIK wrote: "Have you tried Windows Projector (from publish settings) ?"
    Sweeeeet! That works great Hakan, we can certainly use the Flash Projector.
    One more solution I just came up with through googler(in case anyone is interested)
    -  Create a .bat file and call it from  fscommand:
    In Flash:
    function openPdf(event:MouseEvent):void{
    fscommand("exec", "openPdf.bat");
    In your fscommand folder:
    Create a .bat file called openPdf.bat with the following contents:
    @echo off
    file.pdf
    exit
    For this solution to work, name your pdf 'file.pdf', or change the name in the bat file and place the pdf in your fscommand folder as well.
    However, it's alot more work than just calling the navigateToURL funtion, but if you don't want to use a web browser to display your pdf, then the bat file method will work.
    Thanks for the solution Hakan, much appreciation,
    ~Chipleh

  • IOS: navigateToUrl and openWithDefaultApplication to open a local pdf file

    I tried using navigateToUrl and openWithDefaultApplication methods to open a pdf file on iOS platform.
    Nothing...
    I tried also copying the pdf file to the app storage directory...nothing...
    All goes well on the Mac air app.
    Any suggestion?
    Thanks
    Angelo

    Maybe try using a native extension solution like:
    https://github.com/katopz/ane-device-file-util

  • I am trying to attend an online class, but can't get to it.  i called the instructor and she told me to turn off the popup blocker.  do i have one of those?

    I am trying to attend an online class, but can't get to it.  i called the instructor and she told me to turn off the popup blocker.  do i have one of those?

    You didn't mention what web browser you are using so it's hard to say.
    One quick thing you can try if you need to log into the class right now is to download a different browser. Assuming you're using Safari, some possible alternatives include Firefox by Mozilla, and Chrome by Google.
    If you continue to experience problems please provide more information about the iMac, version of the Mac OS, and which browser version you are using. Most browsers have the ability to block pop-up windows. You just need to check your options. Here's what it looks like in the current version of Safari.

  • Query related ExternalInterface and chrome popup blocker

    I want to call js function on service  response my code is as below
    when I run this in google chrome, If I click directJs button It works properly,
    It open new window.
    But when I call js(ExternalInterface ) from service response It stuck in popupblocker
    My aim is to execute js function from service responce in google chrome browser
    please guide with solution.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
              <mx:Script>
                        <![CDATA[
                                  import mx.messaging.messages.HTTPRequestMessage;
                                  import mx.controls.Alert;
                                  import com.adobe.serialization.json.JSON;
                                  import mx.rpc.events.FaultEvent;
                                  import mx.rpc.events.ResultEvent;
                        import mx.rpc.http.HTTPService;
                        private function CallService():void
                                  var myService:HTTPService = new HTTPService();
                                  myService.addEventListener(ResultEvent.RESULT, ResultEventFunction);
                                  myService.addEventListener(FaultEvent.FAULT,FaultEventFunction);
                                  myService.useProxy = false;
                                  myService.method = HTTPRequestMessage.GET_METHOD;
                                  myService.url = "https://www.googleapis.com/books/v1/volumes?q=science";
                                  myService.send();
                        private function ResultEventFunction(e:ResultEvent):void
                                  ExternalInterface.call( "window.open", "http://www.google.com", "_blank" );
                                  lbl.text = "service result";
                        private function FaultEventFunction(e:FaultEvent):void
                                  ExternalInterface.call( "window.open", "http://www.google.com", "_blank" );
                                  lbl.text = "service fault";
                        private function CallJS():void
                                  ExternalInterface.call( "window.open", "http://www.google.com", "_blank" );
                                  lbl.text = "direct js";
                        ]]>
              </mx:Script>
              <mx:Button label="CallJS" click="CallJS()"/>
              <mx:Button label="CallService" click="CallService()"/>
              <mx:Label id="lbl"/>
    </mx:Application>

    Hi Prabodh,
    As per this link http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/external/External Interface.html
    "Note for Flash Player applications: In Flash Player 10 and later running in a browser, using this class programmatically to open a pop-up window may not be successful. Various browsers (and browser configurations) may block pop-up windows at any time; it is not possible to guarantee any pop-up window will appear. However, for the best chance of success, use this class to open a pop-up window only in code that executes as a direct result of a user action (for example, in an event handler for a mouse click or key-press event.)"
    you can not open window in timer event or some result event of service, you must need some human event like click,key-press or touch....
    may it help you.
    Regards,
    Virat Patel
    ACE-Flex3/Air

  • In the past few weeks I have been experiencing  popup audios.  They are annoying and I would like to block them. I am using Firefox as my browser. Any ideas?

    In the past few weeks I have been experiencing  popup audios.  They are annoying and I would like to block them. I am using Firefox as my browser. Any ideas?

    Hi Lowell,
    I don't know if you have the popup blocker turned on (nor if it works for audio), but if not, try it: Firefox menu > Preferences > Content > Block Popups.

  • AS 3.0 - using ExternalInterface.call to open a .pdf

    Hi - using Flash - AS 3.0:
    I am trying to use ExternalInterface.call to open a .pdf file - but it is not working - nothing is happening...
       ExternalInterface.call ("window.open","diagrams/v1/crh.pdf", "WindowName", params);
    but this line DOES work - call an .html file to open.
       ExternalInterface.call ("window.open","m5_quiz/v1/quiz.html", "WindowName", params);
    I can't find any information that says this should or shouldn't work - it seems to me it should open it.
    To get around this - I have been using 'navigateToURL' to open the pdf file - but that triggers the pop-up blocker - using the External Interface call does not.
    Any help/ideas?
    Thanks,
    Lisa

    I agree - that code - if it opens an html should open a pdf - but it doesn't.  And I don't know why..
    Why is the code screwy?  Could I do it better another way?
    Thanks

  • Problem with IE8 popup blocker and Windowless mode

    My team is having popup blocker issue, which is crippling our system where a large range of users are now complaining that their links or buttons will not open in IE7 or IE8 and results in the pop-up blocker message.
    Our Flash application's embed code needed wmode set to windowless ('opaque' or 'transparent') since we need to place floating HTML objects over the Flash application. But all links (within static text content) with target set to '_blank' or a custom name and also all navigateToURL() methods with the same target values are now resulting in IE pop-up blocker message once the window mode was changed to 'opaque' (same result also with 'transparent').
    We have a AS3 work around for the navigateToURL() method but no solutions for 100s of pages of simple HTML content contributed by users that have links as well as our own Flash static-text content with links.
    Here is a simple page created to demonstrate the issue - http://clients.projectmiso.net/photobiz/custom_lightbox/Test_File.html
    And the ActionScript 3 code -
    var clickFunction = function(){
        var targetURL:URLRequest = new URLRequest("http://www.yahoo.com");
        navigateToURL(targetURL, '_blank');
    btn1.addEventListener(MouseEvent.CLICK, clickFunction);

    Hi!
    One thing you could try is to use MOUSE_UP instead of CLICK
    ( tip-source : http://www.actionscript.org/forums/showthread.php3?t=176795 )
    This example uses clickTag parameter (through flashvars) instead of a hardcoded URL inside the flashfile though,
    but I'm sure you get the point:
    clickBtn.addEventListener(MouseEvent.MOUSE_UP, function(event: MouseEvent): void {
    var sURL: String;
    if ((sURL = root.loaderInfo.parameters.clickTag)) {
    navigateToURL(new URLRequest(sURL), "_blank");
    clickBtn.buttonMode = true;
    clickBtn.useHandCursor = true;
    Or you might want to have a look at this workaround :
    Example :  http://apdevblog.com/examples/navigatetourl/
    Info : http://apdevblog.com/problems-using-navigatetourl/
    /Ola

Maybe you are looking for

  • Photoshop CC: program error occures when working with videos

    Whenever I'm trying to trim a video in Photoshop CC I'm running into this error: "Could not complete your request because of a program error" I can't close it by clicking "okay", so I have to close photoshop via task manager. - I also came across thi

  • Uneven closed lid

    I have noticed on my MacBook Pro 15" that when the lid is closed, there is a bigger gap on the right, then on the left side between the lid and the bottom. Is that normal?

  • Help for using FM SO_NEW_DOCUMENT_ATT_SEND_API1

    hi ,... i need help in putting a new line in the attachment which can be sent by using the FM SO_NEW_DOCUMENT_ATT_SEND_API1. for a quick reference please check out program:RSSOAPIS and let me know as to how can i add a new line in the attach file

  • Third Party tools nw2004s

    Everyone, we are doing major upgrade from 3.5 to nw2004s.I have links from the master guide regarding the upgrades but can any one tell me how does it affect our third party tools already running on 3.5x. do they still continue running on new release

  • Moved library to external drive ... now can't reconnect files HELP

    Hi all. I've searched this forum for answers to my problem but to no avail. In effort to free-up hard-drive space on my iMac, I decided to move my entire Aperture library folder to my external g-drive. Then, when I started Aperture up again, I opened