Allow java script to close safari window

I was wondering if there is a configuration I can do to allow a Java script to close the Safari Window. Here's the script:
Display Text
Close this page
Close this window
Basically, this is part of an authentication script that we use here at our university. We have to setup our public workstations to go to this internal site so that the students can authenticate with their id. After successful authentication, the script goes to a similar code (above) and closes the browser window and the user will be able to see the desktop.
Our XP stations using IE are ok. We have IE running in kiosk mode and lockdown all other functions of the browser and OS so that the user cannot close the browser. On our Macs, we are struggling with this part. Actually a few parts but this is one of them. We can get Firefox to work but we want to be able to use safari. I have read that it's a security feature of Safari to not allow this type of script to work.
Second part in relation is we may try using a kiosk browser called "wkiosk". It is perfect and locks down everything form browser to OS. But, it is Safari based and we are faced with the same problem. It is not allowing the Java script to close the browser.
Any suggestions on how to make this work? Thanks!

You can't close it as such, but you should be able to get it to re-open with a blank tab by first clearing Safari's cache : Settings > Safari > Clear Cookies And Data (Clear Cache on iOS 4) and also Clear History
And then close Safari completely : from the home screen (i.e. not with Safari 'open' on-screen) double-click the home button to bring up the taskbar, then press and hold any of the apps on the taskbar for a couple of seconds or so until they start shaking, then press the '-' in the top left of the Safari app to close it, and touch any part of the screen above the taskbar so as to stop the shaking and close the taskbar.
When you re-open Safari you should, hopefully, just have a blank tab.

Similar Messages

  • [svn] 4628: Fix FB-15947: Terminating debug session closes Safari window including tabs not launched by debugger

    Revision: 4628
    Author: [email protected]
    Date: 2009-01-22 15:45:06 -0800 (Thu, 22 Jan 2009)
    Log Message:
    Fix FB-15947: Terminating debug session closes Safari window including tabs not launched by debugger
    Ticket Links:
    http://bugs.adobe.com/jira/browse/FB-15947
    Modified Paths:
    flex/sdk/trunk/modules/debugger/src/java/flash/tools/debugger/concrete/appleScriptCloseSa fariWindow.txt

    Revision: 4628
    Author: [email protected]
    Date: 2009-01-22 15:45:06 -0800 (Thu, 22 Jan 2009)
    Log Message:
    Fix FB-15947: Terminating debug session closes Safari window including tabs not launched by debugger
    Ticket Links:
    http://bugs.adobe.com/jira/browse/FB-15947
    Modified Paths:
    flex/sdk/trunk/modules/debugger/src/java/flash/tools/debugger/concrete/appleScriptCloseSa fariWindow.txt

  • Unable to close Safari windows

    I am unable to close any windows in Safari.
    I am able to expand and minimize them.
    I had been unable to open Safari which I resolved by removing the Safari preferences file and have tried repeating this as well as resetting Safari and running general maintenance proceedures such as permissions, scripts, etc. with no success.
    Is it possible to reinstall just Safari ( mine is version 2.03) or can this only be done through a system update?
    Thanks for your help!
    733 MHz Power PC G4   Mac OS X (10.4)  

    After attempting various fixes and several unsuccessful attempts at using the 10.4.7 combo updater I was finally able to update to 10.4.7 from my Tech Tool eDrive.
    Somewhere along this process, I think after the System update, my window problem was resolved.
    Thanks.
    733 MHz Power PC G4   Mac OS X (10.4)  

  • Can't close Safari windows

    I can close tabs, but when I get to the final tab, I cannot close the window. Neither can I close any window with multiple tabs open, either by pressing the red close button or with CMD-W. I can minimize the window, however. I've tried resetting Safari and deleting prefs, all to no avail. Any suggestions would be appreciated.
    Thanks,
    Saul

    HI Saul and welcome to Apple Discussions...
    First, try restarting your Mac. If that doesn't help...
    Your profile indicates you are running 10.4.11 with Safari 3.0.4
    Tiger 10.4.11 minimum requirements for Safari is Safari 4 with the 2009-002 Security Update installed. Click Safari/About Safari to make sure which version of Safari you are runnig.
    From the Safari Menu Bar, click Safari / Empty Cache.
    Go here for trouble shooting 3rd party plugins or input managers which might be causing the problem. Safari: Add-ons may cause Safari to unexpectedly quit or have performance issues
    Web pages now include a small icon or 'favicon' which is visible in the address bar and next to bookmarks. These icons take up disk space and slow Safari down. It is possible to erase the icons from your computer and start fresh. *To delete Safari's icon cache using the Finder, open your user folder, navigate to ~/Library/Safari/ and move this file "webpageIcons.db to the Trash.*
    Carolyn

  • Script to close finder windows

    Hi,
    I have a network volume that mounts automatically (I drug it into login items). Someone gave me this script to close it, which I also have put into login items. Works great.
    tell application "Finder"
    close Finder window 1
    end tell
    What I need to do is modify it to close 2 windows, as I am adding a new network disk to login items. Can someone help me understand what needs to be changed or added to accomplish this? I'd like to know what the process is to edit it so that when I add more disks in the coming months I can make the changes to have all those windows close by themselves.
    Thanks,
    Sean

    Hi, thanks for your quick responses.
    close Finder window "TheNameAtTheTopOfTheWindow" sounds like it might be the best way to go since it's so specific.
    As for the close every window command, is that the actual syntax? (I don't even know if that's the right word, lol)
    Also, I just had a thought, in case there is a delay in the mounting of the disk (maybe it's spinning up or something) and the script runs before the window opens, is there a kind of "wait" command I can put before the tell finder commands that will force it wot wait for maybe 10 seconds?
    Thanks again,
    Sean

  • Opening firefox comes a Java script error pop up window

    Today I've been having this problem when I open Firefox
    I get this pop up window, one after another.
    Max shows 20
    LeadManage_OnDocumentLoad pd 1320084884 1320084944
    check4Match l1
    metaKeywords 1aaaa
    metaKeywords 2 [object HTML Collection]
    keyarray metaKeywords:undefined
    url:http://support.mozilla.com/fi/questions/881878?=s=java+script&r=1&as=s
    mySearchString:undefined
    How can I fix this, I have installed Firefox again but no help.

    How do you remove my compagion in modules? Please reply ASAP . Thanks .

  • How to close safari window in iPad?

    I upgraded iPad2 to ios5 and Safari is configured differently.  I can't see how to close an open URL.  Previously, you could touch the little open book that had the number of open windows, and a screen with all the open windows opened.  You could just click on the x in the corner and the URL would close.  Now the open URLs are listed across the screen, and little open book shows no numbers and when you hit it you get History.  So, how to close a URL? 

    You can't close it as such, but you should be able to get it to re-open with a blank tab by first clearing Safari's cache : Settings > Safari > Clear Cookies And Data (Clear Cache on iOS 4) and also Clear History
    And then close Safari completely : from the home screen (i.e. not with Safari 'open' on-screen) double-click the home button to bring up the taskbar, then press and hold any of the apps on the taskbar for a couple of seconds or so until they start shaking, then press the '-' in the top left of the Safari app to close it, and touch any part of the screen above the taskbar so as to stop the shaking and close the taskbar.
    When you re-open Safari you should, hopefully, just have a blank tab.

  • I upgraded to Firefox 8.0 and java script no longer works. I set the options to allow java script in the tools/options to allow java script but it still doesn't work. Are there any fixes?

    I support several web sites that I developed for clients and I use java script to manage/show slide shows. After upgrading to 8.0 my scripts don't load. When I click on preview on my web development tool my page will not load the java script - nothing shows on te screen. All used to work OK and still works in IE.

    Thanks for the response, Karsten,
    However, no Divx 5 Component but I did have a Divx Decoder Component and a Divx 6 Decoder Component, so I tried what you suggested anyway with those but to no avail.
    Still not working!
    Regards,
    John

  • Can't get Java to work on Safari Windows

    Have downloaded latest Java for Windows, but doesn't work with Safari. Am running windows XP. Any help?

    I'm not wrong. Java in Safari does not work for me and, judging by the posts in this forum, for the vast majority of Safari users on Windows. Replying "it works fine for me" is not a helpful response.
    Just to humour you I tried the link in your post and this was the result:
    http://www.flickr.com/photos/42042480@N00/692627803/
    I get the same result for all Java applets with Safari. They all work fine in IE7 and FF2. And for all those telling me to download the plugin, if you had bothered to read my earlier post you would know that I have downloaded the plugin, which is no more than the latest JRE from Sun.
    Michael.

  • Red X will not close safari windows after 10.4.4 update

    I can not close my safari sessions with red red X...any help?

    Hi, Jeffrey, welcome to Apple's user-to-user discussion forums.
    There are a few things you should try to see if they fix Safari.
    First, have you repaired permissions? This should be standard procedure after updates. If you haven't, run Disk Utility in the Utilities folder in Applications. Click on the icon for youe hard disk and then click on Repair Permissions. You can let it run in the background.
    Next, empty Safari's cache. Not closing with the red dot does not sound cache-related, but this is easy to do and will rule it out. Go to Safari > Empty Trash.
    If that does not work, delete Safari's Preferences. The file is named "com.apple.Safari.plist". The fastest way to find it is to paste the name (without quotes) in Spotlight. You will get one entry. Click on Show All and you will be able to drag the plist to the trash. Restart Safari and try again.
    One more thing you can try is to see if the problem occurs in a new user account. To create a new account, open System Preferences and click on Accounts. You may have to click on the padlock and give your admin name and password to create an account. Click on the plus sign in the lower right corner to create the new account. I see no reason to give it a password. You can delete this account later using using the minus key, although I have kept my second account to use for testing (the user folder only takes up 32 kb).
    Do these things one at a time and recheck Safari at each step. Let us know what happens and, if needed, we can go on from there.

  • Dynamic Stamp Java Script Problem (8.0 Windows)

    I have created a dynamic stamp for my engineering firm, but I am having one problem. The stamp is a date stamp with other information and I need the date to look like this:
    JUL 10 2008
    However, I can only get the first letter ('J') to be capitalized. Is there a way to alter the custom scripting to enable me to get all three letters of the month capitalized?
    Thank you in advance for any responses...

    Thank you for the post, but...
    how do you get the "mmm" part to all be capital letters? As it stands, my date stamp looks like this:
    Jul 10 2008

  • Imac cursor keeps jumping when safari is opened. stops when i close safari windows

    This keeps happending sporadically. cant really work with the cursor jumping around

    There are several possible causes for this issue. Take each of the following steps that you haven't already tried until it's resolved. Some may not be applicable.
    1. Follow the instructions in this support article, and also this one, if applicable. A damaged or defective AC adapter could be the cause, even if it's the right kind.
    2. Open the Bluetooth preference pane in System Preferences and delete all pointing devices other than the trackpad, if applicable. Disconnect any USB pointing devices. By a "pointing device," I mean a peripheral that moves the cursor in response to user input, such as a trackpad, mouse, trackball, or graphics tablet. A plain keyboard is not a pointing device.
    3. Boot in safe mode and test, preferably without launching any third-party applications. If you don't have the problem in safe mode, but it comes back when you reboot as usual, stop here and post your results. If you can't boot in safe mode, do the same. If you booted in safe mode and there was no change, go on to the next step.
    4. Reset the System Management Controller.
    5. If you're using a Bluetooth trackpad, investigate potential sources of interference, including USB 3 devices.
    6. A swollen battery in a portable computer can impinge on the trackpad from below and cause erratic behavior. If you have trouble clicking the trackpad, this is likely the reason. The battery must be replaced without delay.
    7. Press down all four corners of the trackpad at once and release. If there's any effect, it's likely to be temporary, and the unit needs to be serviced or replaced.
    8. There's a report that a (possibly defective) Thunderbolt Ethernet adapter can cause the built-in trackpad of a MacBook to  behave erratically. If you're using such an adapter, disconnect it and test.
    9. There's also a report of erratic cursor movements caused by an external display that was connected but not turned on.
    10. If none of the above applies, or if you have another reason to think that your computer is being remotely controlled, remove it from the network by turning off Wi-Fi (or your Wi-Fi access point), disconnecting from a Bluetooth network link, and unplugging the Ethernet cable or USB modem, whichever is applicable. If the cursor movements stop at once, you should suspect an intrusion.
    11. Make a "Genius" appointment at an Apple Store to have the machine and/or external trackpad tested.

  • Can't find a java script that will close browser window

    I went through the archives and found several java scripts
    for closing browser windows. Unfortunately none of the work. If I
    find one that will work on a Mac - Safari then it won't work on a
    PC - IE. I downloaded and installed that extension but cannot find
    it on my Mac menus. Running MX2004 on a Mac.
    Here are the codes I've tried and a example page:
    <a href="#" onClick="window.close()">close
    window</a>
    <a href="javascript:window.close();">{YOUR TEXT
    HERE}</a>
    <a href="javascript:window.close()">Click here to close
    this
    window</a>
    <a href="javascript:self.close();"> close window
    </a>
    Here's an example of a non working page:
    [removed to protect the company]
    and another script that doesn't work:
    [removed to protect the company]
    Thanks for all your help.

    phrarod wrote:
    > I came here to learn. It was a simple thing and I was
    embarrassed that I forgot
    > how to do it. I mentioned that. I thanked Alan. My
    friend owns that company.
    > He's trying to help me out. He's a great guy and helps
    people alot. He doesn't
    > rip anyone off or pay them a pittance. He doesn't do a
    ton of web work because
    > as you said its harder and harder to get any money since
    clients have to be
    > educated why they need you when they can get it for free
    or $300 or a couple
    > hundred. We're all trying to make a living. If someone
    helps me I want to repay
    > that help if I can. I know I'm not paying for the advice
    here and since its in
    > a forum I don't know about I can't help technically.
    Networking is always a
    > good thing. I tried to help by offering a lead. How do
    you know this person
    > doesn't pay much? Because of me? Rather than following a
    lead you just assumed.
    > I know a lot about print and TV. I'm trying to fill out
    my skill-set to offer a
    > wider range of services. End of rant. I'm just hurt I
    was stepped on as it
    > blind-sided me. I have a solution. If its so basic it
    upsets the people who
    > answer then don't answer.
    >
    Don't feel offended, the comments weren't directed at you,
    rather at the
    bizarre world of web design.
    :-) We need to hang tough and help each other, whether we're
    working
    for a decent salary, for a pittance, or for our middle-aged
    aunt.
    Bonnie
    in California
    8 ^ )

  • Coding to allow the X (Close Window icon) to close a window.

    I have coded a number of Modal screens called from a main screen.  I can't seem to find what allows the windows Close Window icon (X) to close the screen.  The user must hit my exit button to leave, and I want to keep that as an option, but also allow the X to close the window and be able to handle it in my User Command module.
    Thanks in advance

    Hi Paul,
    First set the PF-status with CANCEL and activate it
    for the model screen.
    in PAI.
    module leave_screen.
    in program
    case ok_code
    when 'CANCEL'.
    leave to screen 0.
    endcase.
    Best Regards
    Ramchander Rao.K
    Edited by: Ramchander Krishnamraju on Dec 23, 2008 11:06 AM

  • Please help: Running a java script form the windows command line.

    Hello forum,
    I'm trying to run a java script from the command line on
    windows but I always get the "Failed to open document" alert.
    I typed the following in the run command line:
    "flash.exe" C:\Documents and Settings\Hasan.Atieh\My
    Documents\science\java scripts\testing jsfl\get_files_mx2004.jsfl
    now I copied and pasted the path of my java script file from
    the windows explorer address bar so I'm sure that the java script
    file exists in the specified path.
    Any thoughts why am I getting the message!!

    :oops: never mind... issue resolved. I didn't quote the java
    script file path but thats because the help documents on flash
    didn't say that.
    this is what flash help say:
    To run a script from the command line on Windows:
    Use the following syntax (add path information as required):
    "flash.exe" myTestFile.jsfl

Maybe you are looking for

  • Iphone and Windows Vista problem

    Okay, so I have windows vista and the iphone seems to be having a hard time with that. When I plug my Iphone into my computer it recognizes the apple device and asks if I want to import picture. In itunes it shows the button that the Iphone is plugge

  • CreateThread function in windows 8.1 phone Applications

    Hi, can we use the CreateThread function in Windows 8.1 phone App's? Windows Phone 8.1: This function is supported for Windows Phone Store apps on Windows Phone 8.1 and later. Above line from MSDN, I see that it is supported for windows 8.1 and later

  • HP G71-343US

    Is there a "dock" for this laptop and if so what part # do I try ordering it?

  • Freeze Column or Header row in Web report (NW04s)

    Hi all, there are lots of proposals on how to freeze (or lock) the lead column or the header row in BW3.x, but can't find any information on how to do it in NW04s Web reports. I believe you require some Java scripting. Any ideas? I know you can do pa

  • Premiere Elements 7: video/audio asynchronous in recorded HDV only in PrEl

    I recorded five tapes with PrEl with my HDV camera (Sony HVR-HD1000E, european version) on my harddisk each as one large MPEG-2-file. I edited for hours and found that the audio increasingly did not match video in only one of the large files (about 3