Javascript:window.open

Hi ,
I am trying to open a pdf file in a new window as soon as user clicks on a Arizona. I am able topen that pdf file in new window but after its opened in new window , my original window getting refreshed, thats not suppose to happen. This is happening because I kept href="".
<TR><TD><font size="1">Arkansas</font></TD></TR>      
function PdfOpen(state)
var openWindow;
var pdfUrl;
if (state=="AZ")
pdfURL = "http://pdf_files/sch_mi.pdf";
openWindow = window.open(pdfURL);
openWindow.focus();
If I remove that href="" then rewrite the code like below , then I am able open a pdf file in new window with out original window get refreshed. but the problem here is there is no link on Arikans( Imean if I click on that its opening but people won't know that they should click on that, i.e as soon as the cursor comes onto the arizona, cursor has to change to hand symbol isn't..?thats not happening).
<a onClick="window.open('http://pdf_files/sch_mi.pdf');">Arizona<a>

arizona
try this

Similar Messages

  • Javascript Issues with 'javascript:window.open'

    Hi guys,
    Really hoping someone can help out here. To set the scene I have detailed a similar example from the OEHR Schema based on the EMP table.
    I have a page defined with a classic report with all the contents of the EMP table, for example :
    HIREDATE | SAL | COMM | DEPTNO | MGR | JOB | ENAME | EMPNO |
    I have edited the column EMPNO report attribute so i can create a link from the EMPNO column, in the Column Link section i have defined the following attributes :
    Link Text : #EMPNO#
    Target : URL
    URL : javascript:window.open('f?p=&APP_ID.:28:&SESSION.::NO::P28_EMPNO:#EMPNO#');
    So in the URL i call the javascript function to open a new window, passing the Application ID, Page 28, Session ID and a parameter for the EMPNO.
    So far this all works fine, the new page opens which is also defined with a report region, however this time i pass the parameter item P28_EMPNO into the SQL to return just that row. I understand that from a security stand point this is probably bad practise however, at the moment this appears to be the only way i've managed to figure out how to create a pop up window passing parameters.
    The problem though is the original APEX page must be doing some sort of branch when the EMPNO link is passed, as the page refreshes with the following :
    The actual URL used is : javascript:window.open('f?p=101:28:2506768909457997::NO::P28_EMPNO:7369');
    and the page just displays : [object Window]
    Hope this makes sense.
    Thanks in advance

    Report your problem to Apple here: http://www.apple.com/feedback/ipad.html

  • Unable to open a seperate java console window with javascript:window.open()

    Hi All,
    I am opening a new window using javascript:window.open() function by clicking an hyperlink in a html document. In this new windows I am trying to load an applet. Only for the first time a java console window is displayed in windows system tray . How can I open a different java console window each time I open a new window ? Basically I want to run each applet in its own JVM and it seems that each applet loaded in new window is using the same JVM and hence only one java console window is seen in my system tray.
    Please help ...
    Thanks & Regards,
    Ravi.

    Hi,
    We are currently facing this exact issue. Did you ever find a resolution?
    Any input would be appreciated.
    Thanks,

  • HTMLbeforeForm= SCRIPT LANGUAGE="JavaScript" window.opener = top; /SCRIPT

    I've found this line of code in my formsweb.cfg file, but to be honest I have no clue what it's doing.
    HTMLbeforeForm=<SCRIPT LANGUAGE="JavaScript">window.opener = top;</SCRIPT>
    Anyone know what this code might be responsible for?

    I have seen this sometimes used to prevent the user being asked if they want to close the window when a javascript command to close the window is issued. Not sure it always works with different browsers or versions.

  • Web.showdocument javascript:window.open

    WEB.SHOW_DOCUMENT ('javascript:window.open("http://www.google.com","","fullscreen=no,titlebar=no,location=no,toolbar=no,menubar=no,status=no,resizable=yes");self.close()','_blank');
    syntax doesn't work on web forms on forms9i
    what could be the reason?

    This is the result of new security restrictions added to IE. This is not an issue with Forms.
    More info can be found with a Google Search. Here are additional references:
    Oracle Bug 3813722 -
    After Applying Ms Security Patch 867801 Javasript In Forms Does Not Work Anymore
    Microsoft:
    http://support.microsoft.com/default.aspx?scid=kb;en-us;884763

  • Javascript window.open needs to always open in a new window

    I am tring to create a menu system. When the user selects an item, then clicks Open Application, I want them to be able to open the application in a new browser window with specific window prefs.
    I have added this javascript to my page html header
    function launchAbout() {
    about = window.open("&P2_URL.", "CAT", "&P2_WINDOW_PREFS.");
    return false;
    I then have a html region with the source as:
    A HREF="&P2_URL." onClick="return launchAbout()" <img src=/i/ocpa/open_app.jpg></A>
    When I click on open app, the first time the app will open in a new window, but the second time it will just change the already open window to the new app. If I create new function then the new function call will open in the new window, but the next time it will just refresh.
    It seems like this function only opens a new window the first time it is called. Does anyone have any ideas how to open a new window every time?
    Edited by: user531645 on Sep 24, 2009 7:33 AM
    Edited by: user531645 on Sep 24, 2009 7:38 AM

    I was able to fix my problem. I had to change the java script to this:
    function launchAbout() {
    about = window.open("&P2_URL.", "_blank", "&P2_WINDOW_PREFS.");
    return false;
    }

  • How to return a javascript window.open object

    Hi all,
    I am calling a javascript function to create a window using the External Interface from flex. The function call works and I get a popup window, but I want to return the window.open object that I just created so that I reuse the same window again. I do not want to keep an array of window objects on the javascript side and pass an index back and forth. There will be multiple popup windows that needs to be written to.Right now the return value from the External Interface call is undefined.
    Thanks for any help here.
    Jerry

    Hmmm sound like somthing has gon wrong
    if it dont even work local you may have don somthing wrong when instaling the action ??
    is the action corectly placed in (GoLive Application Folder) / Modules / JScripts / Actions / ???
    What version of GL are you using ??
    Nate's FAQ on golive action:
    http://www.mindpalette.com/actions/faq.php#Anchor-47857
    "3. Why don't my third-party actions work in GoLive CS2?
    Because of a bug in GoLive CS2, the JavaScript code from some third-party actions is not automatically added to GoLive's external script library when first used (usually GeneratedItems/CSScriptLib.js at the top level of your GoLive site). To fix, open your GoLive site window and right click on the GeneratedItems/CSScriptLib.js file and choose Update > Flatten Script Library from the contextual menu.
    This will force GoLive to update the script library to include all used action code. Re-upload the file to your server and the action should be working again. You may need to clear your browser cache to force the new file to load if you've recently visited the page"
    Mayby others have had problem with his action to Try see his forum:
    http://www.mindpalette.com/forum/index.php
    you may also try this:
    1 Open the action as if its a normal document
    2 make a small change
    3 save
    4 change back /remove the change
    5 save
    6 restart golive

  • IPad 2 Safari javascript window.open bug

    I am building a web app that uses the PicUp app to upload photos.
    Part of how it works requires me to open a new tab with javascript, which fires some script to open a new url in an iframe on the previous page.
    I have named the 'windows' accordingly, and it works properly on the iPad 1 (Safari).
    But in iPad 2, the window.open function does not seem to take in a target window parameter, resulting in broken UI. The new tab opens, but the script to open a new URL in the other page's iframe does not work.
    My image still uploads, but the user would be confused, as there is no confirmation screen.
    Help!
    PS: I would also like to comment that it is fairly convoluted to have to download a 3rd party app just to handle http uploads, something every other browser can do natively. What is the reasoning behind not allowing iOS Safari to upload like normal?
    Thanks
    John

    Was able to produce a small test case. 
    To demonstrate this problem, there are three pages.  You will need to load window1.html.  That page has buttons to load the other windows.  Make sure all files are in the same directory.
    window1.html
    <html>
    <head></head>
    <body>
    <script>
    window.name='win1';
    var si = setInterval('check()', 1000);
    function check()
        var d = new Date();
        var s = d.toString() + ' hash: ' + window.location.hash + "\n";
        var log = document.getElementById('log');
        log.value += s;
        log.scrollTop = log.scrollHeight
    </script>
    <form name='myform'>
    <input type=button name='cmd' value='Start second window (no close)' onclick="window.open('window2.html', 'win2')">  
    <input type=button name='cmd' value='Start third window (with close)' onclick="window.open('window3.html', 'win2')">
    <br />
    <textarea cols=80 rows=10 id='log'></textarea>
    </form>
    </body>
    </html>
    window2.html
    <html>
    <head></head>
    <body>
    <script>
    window.open('window1.html#from2','win1');
    </script>
    <p>This is window2.html</p>
    </body>
    </html>
    window3.html
    <html>
    <head></head>
    <body>
    <script>
    window.open('window1.html#from3','win1');
    window.close();
    </script>
    <p>This is window3.html</p>
    </body>
    </html>
    Test scenario:
    If you run window1.html, you will see it is updating the text field with the time and displaying the current hash.  If you press the button 'Start second window (no close)', you will see another tab open up and stay there and the window1 text field will display the hash 'from2'.
    You can close the window2 tab if you want now (don't think it matters).
    If you then press the button 'Start third window (with close), the window1 tab is gone and window3 is still up there.  The title bar says it is window3 but it is not even displaying 'This is window3.html'  If I do a view source (using a javascript bookmark), it does show the window3 script but the <p> and text is not there.  Probably died in the script before parsing was finished.  This is the first problem.
    Now load the window1.html again in the browser (type on URL line).  If you press the 'Start second window (no close)", the one that worked before, and click on the window1 tab to view it and display the updating text box, you will see it did not see the hash change.  This looks like that physical tab was corrupted in Safari from the window 3 test.  I just found if you open a new tab, the new tab will be ok to run the second window (no close test).  At least until you run window3 (with the close).

  • Javascript window.open in adf

    i have tried to use window.open(url, winName) to open a window in ADF,
    i set the same winName but when i call the window.open method every time,
    it always open a new window.
    the code is blow:
    A.jspx
    <script>
    function openWin() {
    var win;
    win = window.open("./B.jspx", "sampleWindow");
    </script>
    <af:commandButton text="open B">
    <af:clientListener method="openWin" type="click"/>
    </af:commandButton>
    when i click the button first time, it open a new window, keep the window opening and click the button again,
    it open a new window too.
    anybody can help me?

    try this in the backing bean of button click action....
            ExtendedRenderKitService erks =
                Service.getRenderKitService(FacesContext.getCurrentInstance(),
                                            ExtendedRenderKitService.class);
            StringBuilder script = new StringBuilder();
            script.append("window.open(\"" +
                          "/MyApp-ViewController-context-root/faces/newSearch.jspx + "\");");
            erks.addScript(FacesContext.getCurrentInstance(), script.toString());
            return null;

  • Javascript window.open always focus back to the main page

    Hi , my web ibanky.com if u click "board" button
    new windows will open when windows load finish
    the brower will bring me back to the main page. why is this the case?
    Thanks

    It seems the focus sometimes goes to the main page because your main page is getting submitted. To prevent the main page from being submitted, try using the following for your Button's onClick property:
    var f = function() {window.open('http://ibanky.com/board'); return false;}; return f();

  • Javascript window.open call results in new window and not new tab.

    I'm creating an extension and using JS to open a new window. I've tried a variety of forms including something like: window.open("https://www.FOO.com" + dest,,"_newtab") and just window.open(url).. The option is set (tools/options) to open in a new tab. I've looked at preferences and forum suggestions to no avail. The proper url opens in a new window instead.
    I've disabled all other addons and plugins.
    I suspect I'm doing something silly, but would appreciate any insights.
    Thx, --Don

    Thanks for the reply. I'd seen those articles. AFAIK, the default settings are as they should be to open in a new tab (3 & 2 respectively). ...new_window.override.external = -1 though I don't know what that does or if it has any bearing on the issue.
    Thx, --Don

  • Javascript window.open in BSP: new window is opened behind the main window

    Hello,
    I use following code to open a new window in my BSP application:
              window.open("<%= controller->display_url%>").focus();
    The new windows is openned up, but hide behind the main window, I need the new window to stay at the front, any idea?
    On one computer running IE7, the new windows is opened and stay at the front. But not for all other computers running IE6.
    Thanks, Jinjin

    Hi,
          We used the below logic :
    <htmlb:button id      = "help"
                        text    = "Help"
                        design  = "standard"
                        onClientClick = "window.open('http://www.sap.com')"
                        tooltip = "Help"
                        />
    It worked fine for us.
    Try this.
    Thanks,
    Greetson

  • Javascript window.open telephone link not working

    Hi,
    I have an HTML 5 web app that uses Sencha touch for the ipad and iphone. I'm having a problem with some code that use to work, when a user clicks a phone icon it should prompt them to call that person if they are on an iphone. After updating to the latest version of ios we are getting a message saying the web address is not valid.
    It doesn't work when using window.open('tel:somenumber') or even just the basic <a href='tel:somenumber'>call</a>
    Also, it looks like the same thing is happening when trying to use mailto in the same instances on a iphone or ipad 2.

    You should not do it there. Use the windows parameter for you Resource config and set "target=_blank"....I am not on my server right now but search these forums and there are some older posts about it.....or wait a little while for someone wanting easy points who will cut-and-paste it here for you pretty soon. =)

  • Window.open javascript on button causes parent window to display blank page

    In Captivate 3, I've created a Text button that executes the
    following Javascript:
    window.open('stakeholder_part2.htm','', 'fullscreen=yes,
    scrollbars=auto');
    The Javascript works perfectly, but when it executes, the
    page in the parent window goes blank except for the word "object"
    in square brackets. Hitting the back button in my browser navigates
    back to the Captivate movie.
    I've tried every combination of settings I can think of in
    the button dialog. Currently I have "top" selected in the window
    dropdown, and "Continue playing project" disabled. The only setting
    that didn't work at all is "New" ("Current" and "Parent" both
    generated the results described above).
    Could this have something to do with the fact that the
    javascript launches the new window in fullscreen mode?
    quote:
    Text

    You could try wrapping your function in a call to void(),
    which basically says "don't return a value when evaluating this".
    It would look like this:
    void(window.open('stakeholder_part2.htm','', 'fullscreen=yes,
    scrollbars=auto'));
    Unless you really want to open a different new window each
    time the function is called, you should also specify a name for the
    new window, as in:
    void(window.open('stakeholder_part2.htm','newWin',
    'fullscreen=yes, scrollbars=auto'));
    The browser will check for an open window with this name and
    show the page in that window if it's still open.

  • Javascript to open a new html page without the various tools bar

    Where can I find a javascript that I could that would to the
    following.
    I will put a button (text button) "QUIT".
    I want to see a dialog box asking the following.
    Are you sure you want to quit this training module? You can
    restart the module at anytime by clicking on the restart button.
    Yes (I go to the URL of the web page hosting the captivate)
    or No (button) I go back to the beginning of the captivate
    file (Slide 1).
    Can we also have a javascript in one captivate file
    for example main.swf (who has 10 slide) and have a button
    that open another captivate swf (5 slides) and have it go to a
    specific slide (for xample the slide 3).
    i know that with Flash it is possible when you load an
    external file. But with Captivate I am a little bit confused on how
    to achieve the same results with Javascript.
    The only javascript that I know of is
    javascript:window.close().

    Here is some documentation on the "window.open()" method:
    http://www.javascript-coder.com/window-popup/javascript-window-open.phtml
    You'll find options for removing toolbars and setting
    size/position.

Maybe you are looking for