Opening an external link using javascript.  Keeping new window in front

I am displaying a photo from an external link when called upon from my swf.  When the user clicks a button, up pops a corresponding photo in a new browser window.  After the photo window has opened, if the user clicks another button the photo browser will update but its no longer in front.  I know I need to use the focus() command but cannot figure how to incorporate it into my AS3 code.
var req=new URLRequest();
function scrollPanePopulate(event:Event){     
     //create the temp variables
     var calledPhoto=pntxml.row[pointindex].PhotoUrl;
     req=pntxml.row[pointindex].PhotoUrl;
     var jscommand:String = "var newwin=window.open('"+req+"','win','height=400,width=600,left=650,top=50,toolbar=no,scrollbars=yes,location=no');";
     var url:URLRequest = new URLRequest("javascript:" + jscommand +"void(0);"); navigateToURL(url, "_self");
The above code works great but I want to keep the photo window in front when it is refreshed.  Any suggestions?
thanks in advance...
-josh

var req=new URLRequest();
function scrollPanePopulate(event:Event){    
     //create the temp variables
     var calledPhoto=pntxml.row[pointindex].PhotoUrl;
     req=pntxml.row[pointindex].PhotoUrl;
     var jscommand:String = "var newwin=window.open('"+req+"','win','height=400,width=600,left=650,top=50,toolbar=no,scrollbars=yes,location=no');";
     var url:URLRequest = new URLRequest("javascript:" + jscommand +"void(0);newwin.focus();");
navigateToURL(url, "_self"); }
//  p.s.  you should be using externalinterface class.

Similar Messages

  • Opening an externally-linked chm in a new window?

    I have tried to get my external chms to open in a new window,
    but am stuck. RH7 doesn't give me the option to open it in a new
    window; all I can do is have it open in the topic frame, but then
    it obviously still shows the original chm TOC in the left pane, and
    not the externally-referenced chm TOC....Can anyone help?

    See if
    this link
    helps.

  • Create link using javascript or other relevant automated process

    i have multiple PDF which i have combined using Acrobat pro... the table of content for this pdf does not have link as i had generated it in Word using RD fields. Now, my main concern is it possible to create links using Javascript or any other process.. i am aware of link tool however my document is very huge and the TOC comprises of around 25 pages.. it will be very cumbersome to manually add for each topic and will be difficult to maintain as we keep updating the document content..i would really appreciate if any one could help me in this as i really stuck up in middle of project...

    thanks a ton for your prompt response..As i had mentioned earlier, i have around 13 sub documents. i have generated a table of contents for these document using RD fields in a seperate document and saved it as TOC.doc. As these are fields are referring to topic outside the current document, the links are not availabled in word.. i am not aware of any possible method in word to retrieve links for these topics just like how a standard TOC in word works. as i saw it PRO, there is an option to create link, i was wondering if there is any way i could automatically link these topics as in PDF, the topics are in the same document where as in WORD these are different documents.If you could suggest some work around, i would be glad

  • Open/save dialog box using javascript.

    Hi,
    working on apex4.1
    How i can display open / save dialog box when click on button or link using javascript.
    Thanks & Regards
    Vedant
    Edited by: Vedant on Jan 27, 2013 10:20 PM

    Hi,
    I am using model dialog box.
    on page header i have copy The code as given in this http://jqueryui.com/dialog/#modal-message link
    //  page header code
    <!doctype html> <html lang="en"><head>  <meta charset="utf-8" />  <title>jQuery UI Dialog - Modal message</title>  <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.0/themes/base/jquery-ui.css" />  <script src="http://code.jquery.com/jquery-1.8.3.js"></script>  <script src="http://code.jquery.com/ui/1.10.0/jquery-ui.js"></script>  <link rel="stylesheet" href="/resources/demos/style.css" />  <script>  $(function() {    $( "#dialog-message" ).dialog({      modal: true,      buttons: {        Ok: function() {          $( this ).dialog( "close" );        }      }    });  });  </script></head><body> <div id="dialog-message" title="Download complete">  <p>    <span class="ui-icon ui-icon-circle-check" style="float: left; margin: 0 7px 50px 0;"></span>    Your files have downloaded successfully into the My Downloads folder.  </p>  <p>    Currently using <b>36% of your storage space</b>.  </p></div> <p>Sed vel diam id libero <a href="http://example.com">rutrum convallis</a>. Donec aliquet leo vel magna. Phasellus rhoncus faucibus ante. Etiam bibendum, enim faucibus aliquet rhoncus, arcu felis ultricies neque, sit amet auctor elit eros a lectus.</p>  </body></html> My Button name is "DOWNLOAD" and on button actions "REDIRECT TO URL"
    on URL TARGET value is ==javascript: myFunction();
    where i have to write this code to bind my apex buttons with dialog box.
    apex.submit(myRequest);the steps i have written above, am doing right or not? Please help to place the code in apex with a right way.
    Thanks & Regards
    Vedant
    Edited by: Vedant on Jan 28, 2013 12:53 AM

  • Firefox won't open links that require a new window to open

    Links that require a new window to open for the link won't open. I thought it was a Java issue, but I updated both Java and Firefox without any success.

    Hello,
    The Reset Firefox feature can fix many issues by restoring Firefox to its factory default state while saving your essential information.
    Note: ''This will cause you to lose any Extensions, Open websites, and some Preferences.''
    To Reset Firefox do the following:
    #Go to Firefox > Help > Troubleshooting Information.
    #Click the "Reset Firefox" button.
    #Firefox will close and reset. After Firefox is done, it will show a window with the information that is imported. Click Finish.
    #Firefox will open with all factory defaults applied.
    Further information can be found in the [[Reset Firefox – easily fix most problems]] article.
    Did this fix your problems? Please report back to us!
    Thank you.

  • External XML using Javascript

    Hi
    By using captivate 5.5, I have created the Glossary using Javascript. But I am unsure on how to 'call' external xml content in a textbox in Captivate 5.5. Please guide me on how to call external xml using javascript.
    And is there any possibility to call "For Loop" javascript in the captivate 5.5. Please advice on how to proceed further.
    Thanks
    Sathish BC

    Explore this:
    http://macrofireball.blogspot.com/2007/07/adding-xml-data-in-adobe-captivate.html

  • Can you open a second jsp page as popup/new window?

    Hi all gurus!
    I have a question regarding popups/new windows in an iview application. Instead of starting with a question let me instead describe what I want to do.
    We have a jsp page that presents a search and then the search result in a table where one column is "clickable". When the user clicks a cell a server round trip retreives data specific for that cell value. This is standard functionality and already fixed so here is what differes: we want a new jsp window to open like a popup, with the data retreived from the server round trip and at the same time the first page with the table shall still be there so that you just can close the popup and click the next cell which creates a new server round trip and a new jsp popup and so on.
    My solution which doesn't work yet: In application "a" I have a JavaScript for the clicked cell which opens another iview application "b" in a new window, by window.open("navurl_to_the_iview"), and that works fine.
    At the same time the value of the clicked cell is written to the data bean and the bean is put in the http session (since component session does not reach between applications).
    The second iview "b" retreives the bean from the http session and fills the jsp page with data.
    Here is now the problem: no data is displayed and this because the iview "b" retreives the bean BEFORE iview "a" has been able to put the bean/value into the http session. How do I know this for sure? Simple, if I do a refresh of iview "b" the value is displayed.
    I could do a JavaScript that recursively checks if the value in the bean is null or not but then I have to do a method that retreives the bean from the http session each time.
    This could work but I wonder if this is the most simple solution. So my question for you gents and madams is: do you know of a more simple solution?
    Best regards
    Benny Lange
    Edited by: Benny Lange on Oct 6, 2009 11:33 AM

    Hi you all.
    In this case the solution was to pass the id in the url to the second iview and let that iview use the id to retreive data from the backend system.
    But I still think the question is interesting, if it's possible to open a second jsp window after a server round trip and still have the first one open.
    All the best
    Benny

  • How to execute a exe file using javascript on app window.load.

    How to execute a exe file using javascript on app window.load.

    Hi sb00349044,
    As I have already mentioned in multiple replies to your previous questions, the SUMO forums focuses on providing help to end users with usage-questions and issues.
    For developer-related questions, please refer to one of the many resources readily available that I have linked to in the past:
    * [https://developer.mozilla.org/en-US/Firefox_OS MDN]
    * [http://stackoverflow.com/questions/tagged/firefox-os StackOverflow]
    * [https://lists.mozilla.org/listinfo Mozilla Mailing Lists]
    - Ralph

  • Want to hide address,Tool,link bars of a new window opened using target="a"

    Hi,
    I have to hide the address bar, tools bar, lilnks bar of a new window opened using the target = "detailWindow".
    I am opening the window on click of a link and button but I cannot use window.open();. On click of the link for the first time a popup window should be opened showing respective data and then on click of the hyperlink the same window (pop up) should get refreshed with the new data.
    I have searched a lot regarding it but I haven't found any proper solution for the same. I have tried using the javascript but only solution I found is to make the window fullscreen.
    Can anybody help me by providing the solution for the above problem?
    Thank you.

    Not possible.
    Use window.open(). There it is for.

  • Opening dynamic external link in new window

    Hi,
    I have a XML file with data and one field is an http external
    url address, what I'm trying to do on the frontend is create a
    button that will call that url from my XML file it goes in the
    format of {product.link}. I've looked at flex examples around the
    net about opening external links in new windows but nothing to use
    an url that has been called via a datasource.
    Ideally it would also bypass the popup blocker issue and also
    allow me to choose to display toolbars, scrollbars etc.
    If anyone could help I would be very greatful
    Thanks

    hi,
    I believe what you looking can be meet by working on Portal Content administration and in SPRO, navigation. Please eloborate more on what you have done and how you want your custom link to appear in portal e.g iview, tab, or seperate window.
    Information from your end could help to understand or even to get more knowledge about this.
    Pramod

  • Opening an external link in a new window

    I have several external links on my web page. When I click on them, they open in the current window. I would like them to open in a seperate window. Is this possible?

    Here are some great sites that will give you step by step instructions for editing the html pages post-publishing:
    http://www.rowan-cottage.co.uk/Site/Target%20Blank.html
    http://web.mac.com/varkgirl/iWeb/Aardvarkland/Open%20links%20in%20new%20window.h tml
    hope that's helpful...

  • Open youtube video link from gmail in new tab instead of same page?

    Hi came back t fox after 3 years. Yesterday after 1,2 months of using a standard action was changed. I was in my gmail clicking on youtube notification to open video in next tab.
    While it was late FF asked me would I like to stay on page or leave it - I chose stay. Now when I want to open video links from gmail it opens in current tab - I failed with research on my own, hence asking community.
    btw browser.link.open_newwindow is set to 1.
    Thanks in advance.

    Hi.
    For a laptop user it is essential to use only pad - for me late at night I would like to open youtube link in new window, one hand wihtout ctrl key, then double click to close tab not finding that tiny x.
    This reminds me that problem comes from TAB UTILITIES addon -although I think mentioned notification is built in from gmail or fox.
    Currently my about:config settings
    browser.link.open_newwindow.override.external
    browser.newtabpage.storageVersion
    are set to 1
    And it works as I wanted - so far.

  • Opening an external link to a target

    Hope this is the right place for this question and that it's
    not too stupid............
    I'm using CS4 to construct a simple web site using a template
    with a navigator bar, header and footer.
    In the Left hand navigation panel I want to be able to
    associate some buttons (Spry menu maybe ?) to opening an external
    URL. So far that's fine, but additionally I want to do the
    following when the link opens in my site:-
    1) I want the link to open in the main content window on the
    RHS of my page (ie I don't want a new browser window to open up)
    2) I also want to be able to left or right justify the
    content of the page when it opens in the RHS window (I've seen
    something called openstyle="rtl" that can be used for languages
    that read Right to Left (Hebrew etc)
    3) The content of the external URL is an image, ie GIF or
    PNG, not text.
    On older sites (DW3) I got close to doing this with Frames,
    but I still could not do the Right justify bit. The images always
    opened left justified and I had to scrolll to the right side
    manually. I figured that Frames were rather out of favour now and I
    should be moving on with some of the new templates, widgets etc.
    You can see my dilema by looking at www.firegrass.co.uk at my
    tester page.
    Any help or guidance would be much appreciated.
    Thanks,
    Neil

    > 1) I want the link to open in the main content window on
    the RHS of my
    > page
    > (ie I don't want a new browser window to open up)
    Then you would have to use frames or iframes to accomplish
    that. Ew.
    > 2) I also want to be able to left or right justify the
    content of the page
    > when it opens in the RHS window (I've seen something
    called
    > openstyle="rtl"
    > that can be used for languages that read Right to Left
    (Hebrew etc)
    You could only do this if you are also in control of the
    pages that are
    being opened in that frame.
    > 3) The content of the external URL is an image, ie GIF
    or PNG, not text.
    So then why the left/right justification?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "CS4Rookie" <[email protected]> wrote in
    message
    news:[email protected]...
    > Hope this is the right place for this question and that
    it's not too
    > stupid............
    >
    > I'm using CS4 to construct a simple web site using a
    template with a
    > navigator
    > bar, header and footer.
    > In the Left hand navigation panel I want to be able to
    associate some
    > buttons
    > (Spry menu maybe ?) to opening an external URL. So far
    that's fine, but
    > additionally I want to do the following when the link
    opens in my site:-
    >
    > 1) I want the link to open in the main content window on
    the RHS of my
    > page
    > (ie I don't want a new browser window to open up)
    > 2) I also want to be able to left or right justify the
    content of the page
    > when it opens in the RHS window (I've seen something
    called
    > openstyle="rtl"
    > that can be used for languages that read Right to Left
    (Hebrew etc)
    > 3) The content of the external URL is an image, ie GIF
    or PNG, not text.
    >
    > On older sites (DW3) I got close to doing this with
    Frames, but I still
    > could
    > not do the Right justify bit. The images always opened
    left justified and
    > I had
    > to scrolll to the right side manually. I figured that
    Frames were rather
    > out of
    > favour now and I should be moving on with some of the
    new templates,
    > widgets
    > etc.
    >
    > You can see my dilema by looking at www.firegrass.co.uk
    at my tester page.
    >
    > Any help or guidance would be much appreciated.
    >
    > Thanks,
    > Neil
    >

  • Random text with links using Javascript?

    I have a very simple script I downloaded that makes text random using javascript. I would like to add a hypertext link on parts of the text, but can't seem to get it to work.
    Would anyone be so kind as to show me how this can be done. I would like to add links to the "Random text string 1.", Random text string 2. etc., within the javascript below.
    <SCRIPT LANGUAGE="Javascript"><!--
    function text() {
    text = new text();
    number = 0;
    // textArray
    text[number++] = "Random text string 1."
    text[number++] = "Random text string 2."
    text[number++] = "Random text string 3."
    text[number++] = "Random text string 4."
    text[number++] = "Random text string 5."
    // keep adding items here...
    increment = Math.floor(Math.random() * number);
    document.write(text[increment]);
    //--></SCRIPT>
    Thank you!

    Hi, Mic,
    I actually don't know if this will work, but what if you added <a href> coding around your text line? You might need \ escape characters so that your script sends it out without trying to execute it as code.
    Z

  • SSRS 2008 : Open a linked report in a new window.

    Hi,
    How can I open a linked report, specified in the Action property, in a new explorer window?
    Thanks,
    Anurag

    Hi Anurag,
    If I understand correctly, you have used the "Jump to report" function to open a sub reoprt(linked report in your question). Now, you want to open the report in a new windows.
    By default, if using "Jump to report" function, the sub report will be opened in itself. That menas, it won't be opened in a new window.
    To open the sub report in a new windows, we can use the "Jump to url". Use JavaScript function "window.open" in the URL to open the reoprt in a new window:
    ="javascript:void(window.open('subreport name'))"
    Please feel free to ask, if you have any more questions.
    Thanks,
    Jin ChenJin Chen - MSFT

Maybe you are looking for

  • Hard Disc

    Hi All I have a problem where when I am trying to import photos into Aperture, the error message says I have insufficient disc space available, and it seems that others have the same as well. I have looked at the info on the file and it seems that th

  • AE 3.1 convert to cs4 problems

    I am trying to open old AE3.1.1 projects but am getting a message that " this file was created with an older version of After Effect (3.1.1 (Windows), and can't be opened. You can convert this file using an older version of After Effects and resaving

  • AS/400 - point SQL to specific member

    When creating a result set via SQL in a java application, what is the best way to point to specific table member? I don't want to issue an OVRDBF unless I have to.

  • Exception in thread "main" java.lang.OutOfMemoryError

    When I try to run this program, I get the error, the program is supposed to display 400 prime numbers. Is it because of the system I am running it on? System: OSX, 256 Ram, 1.25GHz,

  • Domains for Oracle object types

    When I create a domain for a certain Oracle object type there is no way to create some kind of inheritance tree (and there is no discriminator support it seems). On the database level I have several object types that extend a certain base object type