Execute a php file when window closed... onunload

i wish to find a way to run a php file when the window is
closed using the <body onunload="....">
does anyone know how i can do this?
any suggestions?
thanks

thanks for the responses.
But the design is like that.Then it needs to be fixed.
I think this is why there's a shortage of people to write computer applications, they are all wasting their time struggling to implement bad designs.
its a scheduler to be run on tomcat where we interact
with the running batch files and can't be changed.A scheduler in Tomcat? Why run a scheduler in an application server?
any help is appreciated.
I tried to execute the batch file from servlet it
runs , but i see the cmd.exe in windows task manager
and need a dos box open.
Any ideas?If you need a DOS box open then you need a signed-on user. So here's my patch:
1. Write an application that listens for messages from this Tomcat scheduler, and when it receives those messages it does something in a DOS box.
2. Have somebody sign on to the server and run that application.
3. Change the Tomcat scheduler to send messages to that application instead of trying to actually run it.
It's up to you what kind of messages you should send. There are plenty of choices.

Similar Messages

  • How to tell embedded jinitator applet is still running when window closed

    Hello, we are trying to accomplish the same thing that is mentioned in this post from Metalink. I've searched for a solution and hope someone here can help. Instead of restating the issue I think David Wilson does a good job of explaining what is needed. Can anyone please suggest a possible solution?
    From: David Wilton 07-Oct-05 01:08
    Subject: How to tell embedded jinitator applet is still running when window closed
    How to tell embedded jinitator applet is still running when window closed
    Hi,
    We run an oracle 10g forms application through 9iAS over an intranet. All users are running windows 2000 professional.
    We run separate frame = true but I would like to switch to separate frame = false
    With separate frame = true if the user clicks the outer windows "X" close button (forms mdi window) the user is prompted to save changes before the application ends.
    BUT
    when using separate frame = false
    If the user clicks the upper window "X" button (no longer form mdi window but regular browser window) the window and application is abruptly closed.
    I'm interested in using a onbeforeunload function to confirm if the user wants to close the window. This would be placed in the basejini.htm file. This could always ask if the user wants to exit or not. If they click OK then the window closes but if they click "Cancel" you are returned to the forms application exactly where you left. something like event.returnvalue="do you really want to exit?";
    However if the user exited using the normal exit form method then the applet is already closed before the onbeforeunoad event fires and there is nothing to go back to and I want the window to close automatically. This is accomplished using close.html file in post forms trigger.
    So what I want and what I think many may also want is the check if the embedded applet is still running and if so prompt the user to return to the application or continue to close. Of course If the applet is no longer running then just close because there is no reason confirm closing anymore.
    Does anyone have a html/JavaScript solution that can be placed in the jinitiator.htm file? or similar?
    Thank you
    David
    [email protected]
    From: Andrew Lenton 07-Oct-05 08:58
    Subject: Re : How to tell embedded jinitator applet is still running when window closed
    I don't know if this is exactly what you are after but you can add the following to the top of your basejini.htm file and it should prompt the user before exiting the IE window.
    <BODY %HTMLbodyAttrs%>
    %HTMLbeforeForm%
    <SCRIPT>
    <!--
    window.onbeforeunload = unloadApplet;
    function unloadApplet(){
    message = "Warning! Please exit the Java Applet prior to
    exiting the browser"
    return message;
    //-->
    </SCRIPT>
    From: Oracle, mohammed pasha 07-Oct-05 09:55
    Subject: Re : How to tell embedded jinitator applet is still running when window closed
    David,
    Well I could not understand your complete requirement.
    Refer to Note.201481.1 How to Close the Browser Window When Closing Forms And How to Simulate SeparateFrame By Javascript
    Note.115905.1 How to Close Browser Window When Closing Webforms Applet
    Kind Regards,
    Anwar
    From: David Wilton 07-Oct-05 14:37
    Subject: Re : How to tell embedded jinitator applet is still running when window closed
    Thank you for your reply and yes you did not understand my question fully.
    Sorry if this is a long reply
    I am able to close the browser window using information in notes 115905.1 and 201481.1, this is not the issue. We implemented this several years ago. It is workable for both separate frame = true or false.
    It is most important to not allow the user to end their forms application by closing the windows browser, they must close using normal form exit commands.
    What I want is to have separate frame = false, the big drawback to this option is the user can exit the application and bypass all forms code by pressing the windows "X" close button. This is why we need the code as just provided by Andrew Lenton above in this thread.
    BUT Andrew's code will always prompt the user before closing the window and I do not want that. I want the user to be prompted only under scenario 2 listed below.
    Here's the 2 case scenario for exiting the application.
    1. If the user closes properly and uses exit form which fires all normal form triggers including post_form with it's call to close.html file.
    All uncommitted changes are saved or rollback and the users session is ended normally both on the database and in the application server.
    All browser windows will close, great all is good. And without Andrew's code the window will close but with Andrew's code the user will be prompted to close or not, if they select Cancel the window will remain but the applet has already ended so why prompt? ...This is what I want to avoid.
    2. In the forms app. if the user clicks the windows "X" close button with uncommitted changes. The browser just closes the changes are rollback without prompting the user to save. The users sessions are now lost and still running in the database and application server until they are timed out.
    If I use Andrew's code then the user will be prompted to continue to close or go back, if they click Cancel to go back then focus returns to the forms application and the user can continue to work. If the user clicks OK then the window closes and unfortunately their sessions are still lost until timed out.
    So what I desire is to add to Andrew's code to check if the embedded applet is still running and prompt the user to close or not accordingly.
    Something like:
    Basejini.htm like
    </HEAD>
    <SCRIPT LANGUAGE="JavaScript">
    function maximizeWindow()
    window.moveTo(0,0);
    window.resizeTo(screen.availWidth,screen.availHeight);
    function confirm(){
    If(document.embeddedapplet.closed())
    Win.opener = self;
    win.close();
    Else if
    event.returnValue = "Closing Forms Application. OK to continue?";
    </SCRIPT>
    <BODY %HTMLbodyAttrs%, onload="maximizeWindow()", onbeforeunload="confirm()">
    %HTMLbeforeForm%
    I hope this explains my requirements.
    David
    From: Oracle, Evelene Raechel 10-Oct-05 06:45
    Subject: Re : How to tell embedded jinitator applet is still running when window closed
    Hi,
    Note.199928.1 How to Alert User on Closing Client's Browser Window in Webforms
    Regards,
    Rachel
    From: David Wilton 11-Oct-05 17:40
    Subject: Re : How to tell embedded jinitator applet is still running when window closed
    I'm sorry this is not helpful at all.
    Note 199928.1 is only an alert which does not stop the closing of the window and still displays as an alert if the user does close properly using exit form ... so why would you want to display the alert then?
    This is exaclty what I do not want and why I want to determine if the applet is still running before displaying any kind of message.
    David
    From: Oracle, Evelene Raechel 17-Oct-05 12:23
    Subject: Re : How to tell embedded jinitator applet is still running when window closed
    Closing thread.
    Thanks,

    Hello,
    I had the same issue last year - wanting to provide a warning on closing the browser, but only if the Forms session is still running. The approach I took is described below, see also the thread where I originally posted this at Closing brower window
    Hi there,I've had a similar requirement - or rather, the two conflicting requirements: to warn when the browser is being closed, but for the app to be able to close the browser without a warning being fired.
    To always provide a warning when someone (the user or the Forms app) tries to go to a different page (e.g. your close.htm), use Javascript like:
    function confirmExit(){
    if(appletRunning==true) {
    msg="Closing this window or navigating to another page will end your SomeGreatApp session.";
    window.event.returnValue=msg;
    And make a call to confirmExit() in the onBeforeUnload event of your main page.
    You'll notice I first check an 'appletRunning' variable before displaying the warning. This Javascript variable is set to true by my app when it starts up, using an embedded Javabean that calls out to Javascript. Once that variable is set to true, then the warning will be displayed if the user tries to shut the browser by clicking on the 'x' button, or to go to a different URL.
    When my app is shutting down, it uses the same Javabean to set appletRunning back to false. It then navigates to a close.htm - which will be done without a warning being displayed.
    See Re: How can a Javabean call Javascript function of the basejpi.html?? for example code on how to call Javascript from a bean embedded in your Forms app.
    Hope these ideas help you out, it's worked for me (so far, anyway!!)
    James

  • Firefox downloads a ".php" file when I browse certain websites. I'm on a Mac and running OS X 10.6.4

    Firefox is automatically downloading ".php" files when I browse certain websites.
    Without permission, it just simply downloads the files and prompts me to indicate the program I would like to open the file with.
    I work for a school district and Firefox 4 was installed in 4 other computers and it did the same thing with all of them.
    I then reverted to the previous version of Firefox and continued to have the same problem.
    Please advise

    Hold down the shift key when you launch an app in Lion to "discard previous windows".

  • Execute a PHP file in Javascript script

    Hi,
    I'm working on a web base application, and I need to execute a PHP file in a script written in Javascript (InDesign).
    I only need to "open" this file (like a page in a Browser), I don't need to work with it. I only need to have that page executed.
    Someone can provide help, please?
    Thanks and best regards.

    Answered in the InDesign Scripting forum.

  • Firefox keeps asking me to open/download PHP file when it used to be able to display properly.

    I use to be able to view local PHP files normally in Firefox with the PHP parts not rendered while the HTML parts are. Now all it does is ask whether I want to open or save it.
    I've tried editing FF options so that it previews in FF but it doesn't accept any changes. I've cleared my cache and all that. I've tried deleting the mimeTypes.rdf file thing but I can't even find the folder it's in. I've tried disabling/enabling "prompts.tab_modal.enabled" in about:config and restarting FF.
    All are no-go solutions.
    Web PHP pages are loading properly, this problem only comes when I'm trying to load local PHP files. I don't want to install XAMPP or PHP on my computer just to view local files as I never had this problem before.
    In the meantime, I've installed Chrome and it's loading a simple local PHP file just fine whereas FF is asking me to save/download when opening the SAME file. Thanks in advance for any help.

    Yup, deleting mimeTypes.rdf and re-starting did the trick this time. Thanks very much!
    Also, on a somewhat related note, I cannot view mozillazine.org and any sub-domains under it in any browsers. This may be happening to other users as well?
    It's always stuck at "Waiting for ..." or "Connecting to ..." and that's it. Then FF gives up with a "Server connection time-out" notice. Clearing cache and all that doesn't work because I was trying to view those pages before starting this topic.

  • Why won't Quicktime 7.4.1 play .wmv files when Windows Media Player will?

    I am running OS 10.4.11 on a Power Mac G4 Quicksilver 2002. When I try to play .wmv files, the following message appears: "The movie could not be opened. The file is not a movie file." However, I can play such files using Windows Media Player. I have installed Quicktime 7.4.1. That hasn't helped.

    Thanks for the suggestions, but I already had Flip4Mac installed. However, I re-installed it, but I get the same disappointing message when I try to open .wmv files from Flip4Mac's "Quicktime Player." Perian doesn't work either. At http://lifehacker.com/software/quicktime/download-of-the-day-perian-mac-204423.p hp I read the following: Perian is a freeware plug-in designed to enable the playback of almost every popular video codec in Quicktime.
    In fact, pretty much the only major codec not supported by Perian is Windows Media Video files (WMV), but previously-mentioned Flip4Mac should take care of your WMV needs.
    I'd appreciate additional comments and suggestions.

  • Safari crash when window closed

    Like the post earlier, safari crashes when a window closed. I used to have Speed Download, however, it is no longer on my system, and when i searched for it (and permutations of it I found nothing.
    I tried looking in the crash log, but I dont know what Im looking for.
    I would appreciate any further suggestions.
    Thanks

    Hello Illan Wall and welcome to discussions,
    Speed Down Load MUST be removed by using their own un-installer package that comes with it.
    Did you do that or did you just trash the Application?
    Hope that helps some
    Regards
    Ian

  • Making sure text written to file when window closes

    Hello,
    I built an application, and I have the action set for the frame to close out my BufferedWriter stream when the application is being closed down. However, I want to make sure that things are written to the file just in case the application crashes and I have to close it out with task manager.
    I'm not fully acquainted with the java.io packages for file handling...just surface.
    Thank you very much,
    Lior

    If something is going to crash then, by definition, you are not in control of the situation. But Java applications don't crash, do they?
    You might like to look at java.lang.Runtime.addShutdownHook(Thread t);

  • When window closed shows qms$trans_errors window

    Hello,
    I want to report the following problem, regarding qmslib65.pll, revision 6.5.1.12.
    To show the problem, I do the following actions:
    1. In my form I delete a record (which has details record, that are not shown in the form)
    2. I try to close the window and I see an popup window, asking me if I want to save the changes
    3. I answer Yes and due to the restricted relation between this record and its details I see a popup window, telling me that this delete action is not allowed.
    4. The next thing that happens is that the form is showing me the qms$trans_errors window with no information at all.
    My guess is that this is due to the qms$window.when_window_closed procedure, present in the qmslib65.pll, especially the follwing code:
    if l_last_window
    then
    if qms$errors.show_message('QMS-00158')
    then
    commit_form;
    if name_in('system.form_status') <> 'QUERY'
    then
    go_block('QMS$TRANS_ERRORS');
    raise form_trigger_failure;
    end if;
    else
    exit_form(no_validate,full_rollback);
    end if; -- show message
    end if; -- last window
    Notice the go_block('QMS$TRANS_ERRORS') line. In my opinion the violation of the FK restricted constraint is not handled by any business rule (qms$transaction) and therefore the go_block('QMS$TRANS_ERRORS'); statement is obsolete in this case.
    What I want to do know is create a workaround to avoid showing the qms$trans_errors window if no business rule is violated, when closing the window. Any ideas?
    With regards,
    William de Ronde

    This is known bug #2283122. It was fixed in Headstart patch 6.5.2.2, which is available via the supplement option.
    Basically, we added a bit of code to check the number of messages on the cg$errors message stack just before going to the QMS$TRANS_ERRORS block. We now only go to the block if the number of messages is > 0.
    Regards,
    Lauri

  • Making a .zip doubles files when Windows opens it

    So I just found out that when I make a .zip using the 'compress x items" service and then someone uses winzip to open the file, it duplicates them and creates two folders - one of which is full of duplicate non-files.  What's going on here and how can I fix this so that what I see when I unzip the file is what PC users see?

    actually I don't know.  Someone told me that the second folder was called "meta [something]" and was filled with what looked like duplicates but were unreadable.  I think I read somewhere when looking into this that OS X makes this meta information when compressing files that contain icons and whatnot. 
    BUT, I tried that zip program and it seemed to work, but I haven't been able to check it yet.  Also the file size was about 5 megs larger (which isn't that big of a deal, but I thought interesting to note).

  • Execute a .sh file when i start the solaris 10

    Hi guys,
    I want that some .sh files executes, without my intervention, every time that my Solaris 10 starts.
    Someone could help me or send me a link of it !?
    Regards.
    Thank you,
    Leví

    1.
    copy your script into /etc/init.d
    2.
    make a link like
    ln -s /etc/init.d/myscript.sh /etc/rc2.d/S90myscript
    reboot.
    hth
    -- Nick

  • WHEN-WINDOW-CLOSED trigger

    When the trigger fires I would like to exit the form even when the usr is in ENTER-QUERY mode. I can't get it to work with only one mouse click.
    null

    Try this :
    If :system.mode = 'Enter-Query' then
    Exit_Form;
    End If;
    Exit_Form;
    null

  • Muse creates .php files instead .html files when directly uploaded on host in program

    When i use reCaptcha in Adobe Muse it creates index.php files when i click upload on ftp host. If i export it as html, then it works correctly.
    For my own Website it's not a problem (Hoststar.ch), but it appears to be a problem for other hosting providers (Genotec.ch).
    Also if there is a .htdocs file in the folder im exporting it to, it writes a "Muse Generated redirects", but it still won't for Genotec.ch.
    If there is no .htdocs file in the folder, it also won't create one.
    Is that problem fixable or what do i need to do?

    Hi,
    Adobe Muse does not generates .htdocs file. Did you check it with your host, if it is available for you on the server?

  • How to open .php files on mac

    when i tried to click to listen to an audio online, i get this message "the flip for mac plug-in needs your permission to run it".
    Then i clicked "run" and get this:
    "Track.php
    QuickTime Player can't open "track.php" because the movie's file format isn't recognized.
    To see if additional software is available that will enable QuickTime Player to open the movie, click Tell Me More."
    Thanks.

    What am I massing here?  A .php file is not a movie or sound file.  It's script (text I believe). It's on the server.  Even if you downloaded it you couldn't do anything with it other than steer at the code (text).  Wiki has as good a definition as any as to what php files are.
    I would assume that when you click on a php link on a web site it cause code on the server to do what is instructed by that script.  If it's to play a movie or sound or whatever that that is what the script is instructing the server to do.
    If you clicked on a link and got the error you saw in your first post then there is a problem with that web page's html (another scripting language) and it's access to executing the .php file.
    Some references:
    Learn PHP - A Beginner's Guide to PHP Programing
    Your first PHP-enabled page
    I guess the answer to your original question in the title of this thread -- how do you open .php files? -- you don't.

  • Design panel not active with php file?

    I have DW CS5 on two computers.  One one the design panel is active with a PHP file. On the other, it is not active.
    I must have a setting wrong on the one computer. What do I need to do to make the design panel active?  The code panel is fine on both.
    It is very hard to work on a PHP file when I can't see the design panel.
    Regards,
    Bill Schaepe

    The problem is that I have a number of PHP files that I need to modify the words in a form and it is hard to see what I am doing.
    You can't do this in Code view?
    On both computers, I just generate a new PHP file.  On the one computer the design panel is active and I can click design tab on it to see the design.  On the other one, I  can't click on the design panel tab to see the design.
    Both the same version revision level of DW?  Both on the same platform?  Do you have an option to click on "Design" under View on the main menu?

Maybe you are looking for