Open and style a new window

Hello,
Following this thread Re: Apply CSS to help window I'm trying to open and style a new window, using JavaScript. I'm using the following script:
<script language="JavaScript" type="text/javascript">
function newwin(targetURL) {
var swin = window.open(targetURL,null);
swin.focus();
swin.document.getElementsByTagName("body")[0].dir = "rtl";
</script>In a pure HTML environment, it works just fine. In ApEx I'm receiving an error message http://i2.tinypic.com/vfl7qc.png, which relate to the first window. For some reason, the reference to the new window (swin) does not work properly.
An example page can be seen at http://htmldb.oracle.com/pls/otn/f?p=22814:30
Can anyone please help me understand where the problem is?
Thanks,
Arie.

I've just tried your supplied code in Firefox and Internet Explorer in an Apex environment and they both worked fine.
FYI I tested with the following links on my host page:
< A href=javascript:newwin('http://www.leeds.ac.uk');>Click here!< /a >
< A href=javascript:newwin('f?p=103:1:&SESSION.');>Click here!< /a >
And the Javascript code in the header section of the same page.
A few questions:
- Which browser are you using?
- What will be in your popup? Another Apex page or something else?
- If an APEX page, what does the URL look like? Different to mine above?
- Is the popup Apex page a 'normal' page - or have you customised the template significantly?
I would guess that your error message is referring to the fact that getElementsByTagName is returning null - rather than the reference to the window. Thus, I'd check for the existance of a body tag and a generally well formed destination page. Test with leeds.ac.uk as I used above to confirm.
Hope this helps
Ben

Similar Messages

  • Firefox closes existing window when you open and close a new window

    When I'm using firefox and need to open a new window (or a website opens a new window) and I'm done with that new window and close it, Firefox attempts to also close the previous window that I am using. I've tried reinstalling, but other than that I don't know what to do. What usually happens when I close the window is that I have multiple tabs open in the other one and it asks me if I would like to close all my tabs. When I hit cancel, it asks me again. Once I hit cancel the second time it stops bothering me.

    I thought it was doing that also. But I found that if I start a new chat with someone I was messaging before, then the old messages re-appear in the messages window.

  • Since the latest update of Firefox was installed on my Windows Vista Home Premium system it appears to be crashing and sometimes plays up by not opening requested sites in new windows, tabs etc. Should I uninstall and reload Firefox??

    Also when closing tabs and windows the screen appears to momentarily go a blue color. This same blue color can also be seen when Firefox appears to crash or stall. If you try to open a new tab or a new window there appears to be some hesitation before the new window opens and sometimes the new window or tab simply refuses to open-you then have to shut down Firefox and restart to improve this.
    Rgds

    Thanks Alan I tried disabling several items so far and the situation has improved but still not as stable as I would like. Systematic approach is the key here so I'll continue with a process of elimination.
    Rgds

  • How can I put OSX 10.7 on a new Macbook Air. Maverick no longer allows "open file in a new window" and I really miss it. At the Apple Store they told me it can't be added to the new OSX 10.10 so I  want to change the OSX on the new Macbook Air and it

    I have been using a 2012 Mac pro to do HD video editing. I bought a new portable Macbook Air only to find that Maverick no longer has "open files in a new window" which I use all the time in the very large folders of video clips and royalty-free music. I asked at the Apple Store how I could get this back on the Macbook Air and they said it couldn't be done so I thought I would re-format the HD and install 10.7 on it and was notified by the Macbook Air I can't put 10.7 on that computer. Apple use to give this as an option but now they have gone more to the attitude of "Do it our way or go to ****!" In anger I went out and bought a Dell Laptop and Pinnacle Studio 17 which I have been learning to use. I have been an Apple/Mac user since 1979 and would still rather do my video editing on a Mac. Is there any way that I can force the Macbook Air to let me load in OSX 10.7 where there is still the option to  "open files in a new window" or is there a way to add this to Maverick? The experts at the Madison, WI Couldn't give me any help on this.

    Choose Preferences from the Finder menu, click on the General tab, and uncheck the box to open folders in a new tab.
    (117195)

  • Today I think firefox automatically installed a new version and after that it said my adobe flash was old so I had to update that. Now I can't open links in a new window.

    Today I think firefox automatically installed a new version and after that it said my adobe flash was old so I had to update that. Now I can't open links in a new window.

    Firefox doesn't install new versions of plugins, but Flash may update itself automatically.<br />
    You are still one version behind on Flash, current is Flash 10.1 r85<br />
    If the Flash player didn't update properly then you need to download the full version and run the installer as Administrator (right-click: Run as ...)
    Flash Global Notifications Settings Panel:<br />
    *http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager05.html
    You are more versions behind on Java updates with having Java 6 U11, current is 6 U22.
    *Java Plug-in 1.6.0_11 for Netscape Navigator (DLL Helper)
    Update the [[Java]] plugin to the latest version.
    *http://java.sun.com/javase/downloads/index.jsp (Java Platform: Download JRE)

  • Everytime I click on one of my app tabs it removes it form that brower window and opens it in a new window! how do I get it to work right?

    Clicking on an app tab shouldn't remove it from that browser window but it does, seems to sort of defeat the purpose of App Tabs in my opinion. then I have to drag the new tab back into the other browser window and then it works for a little while correctly.
    Thanks in advance for all your help!

    Make sure that you do not drag a tab in the browser window.<br />
    Firefox 3.5 versions and later have a feature called tear-off tabs.<br />
    You can detach a tab from the current window and open it in a new window by dragging a tab in the browser window.<br />
    You can drag that tab back to the tab bar in the original window to undo that detaching.<br />
    bug489729 (Disable detach and tear off tab):
    *https://addons.mozilla.org/firefox/addon/bug489729-disable-detach-and-t

  • Open Google clicks and PDFs in New Window

    When I Google something, then click on links, the links open in the same screen, and not in a new window.  This makes it hard to navigate backwards.
    Also, when I click on PDF link, the link opens in the browser window, and again, I lose the website that I was on.
    Is there a setting on my Mac that can open stuff in a new window?  I tried the Finder General command "open in a new window" but that did not help.
    JoAnn

    Hi,
    I'm using Safari and FireFox -- mostly Safari.
    I looked in Safari preferences, and can't tell what to change.  It says "New windows open with Homepage".  Do I change to "Empty Page"??  Also, I looked at FireFox preferences, but can't see what to change.
    Love your pic
    JoAnn

  • Simply put, I do not like like the new color coding "dots" and I do not like having to press the Command key before double clicking to open files in a new window. How hard would have been to include the old version of these two features?

    Simply put, I do not like like the new color coding "dots" and I do not like having to press the Command key before double clicking to open files in a new window. How hard would have been to include the old version of these two features?

    Apple - Mac OS X - Feedback

  • When I choose to open a new tab from a website, such as facebook, it always opens it in a new window. How do I change this to just opening a new tab. I tried changing the tab settings but it did not work

    When I choose to open a new tab from a website, such as facebook, it always opens it in a new window. How do I change this to just opening a new tab. I tried changing the tab settings but it did not work. I did not have the problem until I started using firefox 4.

    It is probably a JavaScript link.
    You can probably force it where you want it with a keyboard shortcut
    either "Ctrl+click" or "Ctrl+Shift+click". see
    * Firefox and other Browser Keyboard Shortcuts (Comparison Table)<br>http://dmcritchie.mvps.org/firefox/keyboard.htm
    ''Did that work?''
    Some styles that provide a warning as to the type of link:
    * No Follow links, mouseover id of other links - userstyles.org<br>http://userstyles.org/styles/10987
    * Change cursor on some links with JS. - userstyles.org<br>http://userstyles.org/styles/233
    * Link Warning - Themes and Skins for Mozilla - userstyles.org<br>http://userstyles.org/styles/1301
    * Link warning (cursor hover) - various filetypes - userstyles.org<br>http://userstyles.org/styles/2538
    * Red hand cursor for .pdf links - userstyles.org<br>http://userstyles.org/styles/553

  • New Window from "FILE- NEW-WINDOW" duplicates all the currently open tabs in the new window. I want new window with just the "Home" tab please?

    Running Firefox 3.6.13 on 64Bit Win7.
    I like to group tabs on a topic in a window, and when the tabs get to be too many, or a new topic, I do FILE->NEW-WINDOW and expect a new window with just one default (Home) tab. Instead I get a new window with ALL the tabs of the first window.
    I have checked all the Options I could find. Nothing helped. I CAN make a new Window with just one tab if I right-click a link and say "Open in NEW Window".

    A new window should only open with the home page(s).<br />
    If you see differently then you need to check your extensions.
    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]
    * [[Troubleshooting plugins]]

  • I would like to open links in a new window but cannot find where to put the setting. Have unchecked the "Open new windows in new tab instead" box in the Options dialog box.

    When I click a link on a webpage or other software, I would like for it to open in a completely new window.

    You can hold the Shift key and click the left mouse button a link to open that link in a new window.
    The setting in Tools > Options > Tabs is only for links that specify a target window and you can divert such a link to a new tab instead.

  • Open URL in a new window by closing the parent window

    Hi Friends,
    Is there any option to open URL in a new window by closing the parent window on a button click?
    Already implemented the logics suggested in /people/mohammed.anzys/blog/2007/06/05/how-to-close-parent-window-in-webdynpro-applications , the thread ' URL in same window '  and the standard component WDR_TEST_EXIT_PLUG .But button is not triggerring any actions .plz help me  ..............
    Regards,
    Radhika

    hi,
    Do the following steps :
    -> Make an Outbound Plug to the Window.
    ->Make the type of Outbound plug to Exit Type.
    ->Add URL of type String as a parameter to the outbound plug of Window.
    ->Do remember to add Component Name in the Properties Tab of View ( othervs Calling Outbound plug of window from view wont b possible ).
    To open a new URL with closing the previous one write this Code in OnAction of Button : ( this Code can be get from Code Wizard too ).
    DATA lo_zexit TYPE REF TO ig_zexit .   <zexit is name of my Component>
    lo_zexit =   wd_this->get_zexit_ctr( ).
      lo_zexit->fire_out_window_plg(
        url =   'http://www.google.com'                            " string
    I hope it helps.
    Thanx.

  • Open Sub Report in New Window

    Hi,
    We have an application which is integrated with crystal reports.
    So when you open a report from the application it opens up in a new window. (Ours is a web based application and crystal reports opens up in IE browser)
    We have some reports which have subreports (on demand ), is there any crystal report configuration through which these subreports can be opened in a new window, as of now they open in the same main report window.
    Thanks in advance

    hello,
    you may wish to look into saving the subreport as a separate report and then:
    1) calling the report via opendocument (if your app sits on top of businessobjects enterprise or crystal reports server)
    2) calling the report via URL reporting if your app does not utilize the above platforms
    i can't guarantee the above will work as it may depend on your environment that you are hosting the reports in.
    see the help guide [here |http://help.sap.com/businessobject/product_guides/boexir31/en/xi3-1_url_reporting_opendocument_en.pdf]for more information on linking
    http://help.sap.com/businessobject/product_guides/boexir31/en/xi3-1_url_reporting_opendocument_en.pdf
    as per using a subreport and opening in a new window, this doesn't really work.
    if you want though, you can use a Report Part link to go from the open subreport back to the main report. please see more on Report Part linking in your crystal report's online help.
    jw

  • Issue while opening Shop Link in New Window

    Hi All,
    Recently We have upgraded SRM5.0 to 7.0 and now we are using Portal for Front end application. We have configure the SRM appliation in Portal EP 7.0.
    Now i can fetch the data from SRM but problem is when i am opening Shop Link ( Employee Self Serviece --> Shopping Area ) in new window then it's navigating to Home Page instead of opening the Shop application.
    When i am opening the Shop Link in Content area that time its opening correctly.
    Can you please assist us how we can resolve this issue when i am opening Shop link in new window.
    Regards,
    Rahul Sanas.

    Dear Poster,
    As no response has been provided to the thread in some time I must assume the issue is resolved, if the question is still valid please create a new thread rephrasing the query and providing as much data as possible to promote response from the community.
    Best Regards,
    SDN SRM Moderation Team

  • Firefox will not open tabs in a new window

    When I right click a tab, and select the option "Open in a new window", Firefox does not respond.
    I can add as many tabs as I like, but can not open them in a new window.
    I can also right click a link and open it in a new tab, but Firefox does not do anything when I try to open the link in a new window.
    I reinstalled Firefox on my computer, and also updated Java and it did not solve the problem.
    This started happening about a week ago for no apparent reason.

    First check to see if an add-on is causing this problem, for details on how to do that see the [[troubleshooting extensions and themes]] article.
    If that does not help, try creating a new profile. Firefox stores user data in the profile folder, creating a new profile will show if the problem is with the old profile. For how to do that see [http://kb.mozillazine.org/Creating_a_new_Firefox_profile_on_Windows Creating a new Firefox profile on Windows]. If the new profile works, you can transfer select data such as bookmarks and passwords to the new profile. DO not copy the preferences file, and it is best to re-install add-ons. For details of how to do that see [http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox transferring data to a new profile].

Maybe you are looking for

  • Getting a XPRESS exception when clicking on add targets in metaview tab

    Hi , i am trying to create an identity attribute in Metaview and at that time adding targets i am getting the follwing error XPRESS exception: Can't call method getObjectNames on class com.waveset.ui.FormUtil ==> com.waveset.exception.ItemNotFound: O

  • Preview on Lion: open document on start / location signature

    One annoying change in Preview coming along with Lion is that whenever I start Preview the most recently opened document is automatically opened, and I can't find any option to turn off this behaviour! On the other hand, now being able to sign (ie. n

  • Is tech care live a legitimate company?

    My friend was told by an on-line apple support person that he should contact tech care live for help in fixing a hacked computer.  Is this a legitimate company?

  • No registration of Gmail accounts

    Hi! This is Mahesh from Mumbai, India. I have xperia x10 mini and Vodafone Mobile Connect. The problem I am facing is that only the Mail, Navigaiton, Facebook icons are working well. But unfortunately Android Market, Gmai, Talk which are based on gma

  • Moving Music From iPod to Playlist or LIbrary - Can't do it

    In some of my playlists the dreaded exclamation mark appears. In locating these songs, I find them on my iPod. It seems that I can not move them to a Playlist or to the Library. I believe them to be tunes I've purchased thru iTunes. Why can't I move