This code works in Chrome. How can I make it work in FF as well.

function openWin(ID) { // open workshop ID in another window
var URL = '/chatroom.php?ID='+ID;
var name = 'Chat'+ID; // so if you open it twice it reopens the window.
var win = window.open('',name); // no URL - won't refresh
if (win.location == "about:blank") { // new open
win.location.href = URL;
win.focus();
This code is called on a "javascript link". The first call is to open the new window and switch to it. Any subsequent call is to reopen the window WITHOUT REFRESHING and switch to it.
As mentioned. The code works perfectly in Chrome. In Firefax 23.01 the focus call is ignored, leaving the background window or tab in the background.
For what its worth, it does the same in IE 10 either, but IE is a lost cause.

I tested using a bookmarklet: *
javascript:var winTest = window.open("", "winTest1", "width=800,height=600"); winTest.focus(); if(winTest.location.href == "about:blank") winTest.location.href = "http://support.mozilla.org/"; void 0;
Note that I've switched the order of the statements so that winTest.focus() precedes accessing the location object.
When I am viewing a page on this site, the window opens as expected. If I switch focus back to my original window and run the bookmarklet again:
* with dom.disable_window_flip set to its default value of true, <s>the focus ''does not'' change</s> ''correction: this does seem to work''
* with dom.disable_window_flip set to false, the focus ''does'' change
If I try the same bookmarklet from another site, I get a permission error (cross-domain violation) in the Browser Console (Ctrl+Shift+j) attempting to check the current href on the second run. This halted the script before it could change focus. That's why I switched the sequence of statements.
Can you replicate that?
''*'' To create a bookmarklet, display the Bookmarks Toolbar, then copy the above string of code. Right-click the Bookmarks Toolbar, choose New Bookmark, paste the code into the Location box and choose any name you like.

Similar Messages

  • My father in law has a brand new iPhone 5s using iOS 8.1.1 - under settings, general, keyboard, all keyboards... There is no option for 'predictive'. Has anyone else had this? And if so, how can we make it appear? Many thanks!

    My father in law has a brand new iPhone 5s using iOS 8.1.1 - under settings, general, keyboard, all keyboards... There is no option for 'predictive'. Has anyone else had this? And if so, how can we make it appear? Many thanks!

    What langauge is he using? Is it one of the supported languages?
    See here: https://www.apple.com/ios/feature-availability/#quickType-keyboard-predictive-in put

  • Does Firefox History display the "time" as well as the date; how can I make my history show "time" as well as date, etc.?

    I would like to check my history for time of day, as well as for the date. Is this a feature that is common? How do I set it to work showing the time, as well as, the date? Thank you.

    Thank you. I went to the Show All History library and under "View" I selected for time and date. Thank you for the link to how it is done!

  • How can I make a link in a AccordionTab?

    Hi,
    This is my website:
    www.student.tue.nl/V/b.a.t.moor
    As you can see the basis for my website is a Spry Accordion.
    The words with a large font-size are the first navigationlevel. The
    smaller words in the Tabs are the secondaire navigationlevel. Now I
    want to make it this way that when you click on a single word (for
    example: first ideas), you will enter a new page. So it has to link
    to another document (i.e. firstideas.html)
    Is this possible? If so, how can I make this?

    Problem is that its a tab menu. The very nature of the
    javascript that
    drives it is to open that tab anywhere where the mouse clicks
    along its
    length. As the links are also in the tab it just ignores
    these and opens
    the tab.
    Can you not move the links to within the sub-section of the
    tab, that's
    how things usually work with a tabbed menu.
    I'm sure its not impossible to achieve what you want but it
    might be
    beyond your capabilities. It certainly looks as though you
    would need to
    alter the code substantially and maybe re-write the
    javascript to make
    it conform.
    Bas-TUe wrote:
    > Hi,
    > This is my website:
    http://www.student.tue.nl/V/b.a.t.moor
    >
    > As you can see the basis for my website is a Spry
    Accordion. The words with a
    > large font-size are the first navigationlevel. The
    smaller words in the Tabs
    > are the secondaire navigationlevel. Now I want to make
    it this way that when
    > you click on a single word (for example: first ideas),
    you will enter a new
    > page. So it has to link to another document (i.e.
    firstideas.html)
    >
    > Is this possible? If so, how can I make this?
    >

  • S10e: How can I make my external DVD being detected to boot Recovery System

    I bought an IDE-USB Adapter and connected a DVD to the Netbook. But the device is not found even by the BIOS, too.
    So I can not install the System. In addition there will be no BIOS update available for LINUX to detect DVD drives if this is the problem.
    How can I make my Recovery DVD run on my Lenovo Ideapad S10e?
    Solved!
    Go to Solution.

    You use a normal 5 1/4 " DVD/CD drive,.it needs 12V dc did you powered the drive... ?
    So the adapter is not recognized, thats bad ....the usb-ide adapter is defective....
    The second question is... 
    Linux cant use any .exe files ...its not windows... thats normal...
    so what will you install on it ?
    Biosupdate ? is the only one .. i think.. but that is a problem for lenovo... i didnt see an biosupdater under linux
    Why you buy those expensive ide-usb adapter ?
    you can get a slimline cd usb drive is available for 25 $ (or 25€) on online shopper...
    and you dont need a power adapter ...
    Greets KalvinKlein
    Thinkies 2x X200s/X301 8GB 256GB SSD @ Win 7 64
    Ideas Centre A520 ,Yoga 2 256GB SSD,Yoga 2 tablet @ Win 8.1

  • I just upgraded from Express to Pro.  When I open a project in Finder and neither Express nor Pro are running, it always opens in Express.  "Open With ..." says Express is the default.  How can I make Pro the default instead?

    I just upgraded from Logic Express to Pro.  When I open a project in Finder and neither Express nor Pro are running, it always opens in Express. I now want projects to open in Pro.  "Open With ..." says Express is the default.  How can I make Pro the default instead?

    Well, when I've done things like that it always sems like a good idea to keep an application that you know the file will definitely open in...

  • New computer win 8.1 pro, installed my creative Suite 4 Design premium but it shuts down when I try to use any of the programs and gives me an error code 147:20. How can I fix this?

    New computer win 8.1 pro, installed my creative Suite 4 Design premium but it shuts down when I try to use any of the programs and gives me an error code 147:20. How can I fix this? Is this a conflict with win 8.1 pro?

    You need to adjust your security stuff/ permissions and possibly use compatibility modes. It means that your licensing service is being blocked/ shut down.
    Mylenium

  • When I insert a photo from iPhoto into my iMovie, the photo that appears in the movie is different from the one that I inserted - why is this and how can I make it work properly?

    When I insert a photo from iphoto into imovie, the photo that appears is different from the one that I inserted.  Why is this and how can I make it work properly?

    WHat version of iMovie, and iPhoto?
    THIs forum is for iMovie iOS (iPads, iPhones).
    Are you talking about iMovie for Mac?

  • HT4061 how can i make my iphone 4 work again from this activation lock thing?

    how can i make my iphone 4 work again from this activation lock thing?

    Can you provide more info.  iOS version?  Did you have iOS 7 BETA installed previously?  (if so, go to your developer account at developer.apple.com to fix things)
    Try this link...
    http://support.apple.com/kb/ts3424

  • My iPad with this security code and forgot it,how can I get him ?  Is that 4 digit code

    my iPad with this security code and forgot it,how can I get him ?  Is that 4 digit code.

    Recovery Mode
    1. Disconnect the USB cable from the device, but leave the other end of the cable connected to your computer's USB port.
    2. Turn off the device: Press and hold the Sleep/Wake button for a few seconds until the red slider appears, then slide the slider. Wait for the device to turn off.
    3.While pressing and holding the Home button, reconnect the USB cable to the device. The device should turn on.
    4. Continue holding the Home button until you see the "Connect to iTunes" screen. When this screen appears, release the Home button. iTunes should alert you that it has detected a device in recovery mode. Click OK, and then click Restore to restore the device.
    Note: Data will be lost. You may have to repeat the above many times.

  • I seem to be short on space for the trial download. How can I make this work????

    I seem to have less space for my download.How can I make this download happen?????? Will I have to uninstall my old Adobe Photoshop(which has long since worked) in order for this to be installed??

    What exactly are you trying to download on what system? Feel free to download to external drives to bypass the immediate bottleneck, but that may not resolve your issue once you install....
    Mylenium

  • MacBook Pro (OS X 10.9.1) calendar continues to "connect to server" and will not allow shut down or restart. Force quit worked. How can I make this calendar "behave"?

    MacBook Pro (OS X 10.9.1) calendar continues to "connect to server" and will not allow shut down or restart. Force quit worked. How can I make this calendar usable? The problem began after I updated to Maverick.

    babowa, it seems like it is using Fuse & NTFS, so I don't think it's the classic WD + 10.9 mess, but extra WD tools & drivers can still break things MtTran.
    MrTran, if you must use unsupported disk formats on your Mac you must also consider actually paying the developers that made the trial software.
    It's probably a good idea to follow the developers removal instructions, reboot & then install one tool at a time.
    MacFuse, FuseOSX, NTFS-3G are all likley to confict if you run older versions so you need to be sure you are using the latest version. I can't remeber which one depends on the other, so you will need to read the manuals.
    When the disk is readable copy the data to another disk. You could probably do this from a Linux distro or Windows if OS X won't do it.
    If you insist on only using the trial versions you will need to reinstall Mac OS, copy data off this disk & reformat it.
    Is there any good reason for not using the Mac HFS extended format?

  • Using InDesign CS4 on iMac. Had to restore computer from backup. Licensing has stopped working. Error code 150:30. How can I reestablish my license?

    Using InDesign CS4 on iMac. Had to restore computer from backup. Licensing has stopped working. Error code 150:30. How can I reestablish my license?

    You'll need to have a chat with Adobe Support. Here's a link:
    https://helpx.adobe.com/contact.html?step=ZNA_downloading-installing-setting-up_licensing- activation
    We can't help you with that here.

  • HT201274 After doing this my iPhone got stoke in the loading circle. How can I make it work again?

    After doing this my iPhone got stoke in the loading circle. How can I make it work again?

    Try connecting it to your computer and restoring it by going to the Summary tab of your iTunes sync settings and clicking on Restore (see http://support.apple.com/kb/HT1414).  If that doesn't work you'll have to put it into recovery mode and restore it, as described here: http://support.apple.com/kb/ht1808.

  • HT4528 icloud says maximum number of free accounts for this iphone  how can i make it work?

    icloud says maximum number of free accounts for this iphone  how can i make it work?

    You have created too many accounts. There's no way to get around this.

  • Siri doesn't work still after the apple rep I spoke to said it would be back up this morning. anyone else have this problem too? and how can I fix it?

    it has been 24 hours and  Siri still doesn't want to take any commands anyone else have this problem too? and how can I fix it? she just keeps saying there is something wrong and to try again later. I didn't buy this phone to be jipped on any features.

    Mine wasnt working either but i saw in another thread that you should try Settings>General>Reset>Reset All Settings. Ignore the warnings, all your settings have to be changed back but you dont lose any media or data, you just have to put your background back and location settings. It fixed Siri for me but dictation still doesnt work. Hopefully it works for you :-]

Maybe you are looking for