> how to disable this with javascript. Is there anyway i can start a new > session or kill the session if the user opens a new browser window.
You can't really start a new session because when the browser opens the webserver will see the same session settings (controlled via cookie). Your server wont know if it is the same instance of the browser making the request or not. I am not sure you want to kill the old session either (seeing as though the problem you are trying to solve is basically one where you dont want a transaction interrupted by the user doing something). Killing the session would kill the transaction ?? Which would not be what you want to do. The problem is - if you are using browser technology - you can't really control what the user can and can't do. Even if you could stop the CTRL-N there is nothing to stop the user just clicking on another Browser icon and launching it again (it's the same thing). In addition, it is quite likely if you could disable the CTRL-N that it will then be disabled for that instance of the browser (and possibly any additional instances) from that point on until they restart. This is considered very bad practice (ie. modifying the default functionality of the browser) and invariably confuses the user. The only way to solve this type of problem is to program defensively for it on the server. No matter what you actually can do in a Browser (via Javascript) there is no gaurantee that the user will not attempt (either accidently or deliberately) to circumvent what you have done. In addition, there are plenty of "add-in" products these days that give complete control over what types of things will and wont execute on the Browser. One method that I use to try and solve the "multiple submit" problem (which may be what you are actually trying to avoid) is to place a GUID (or some other fairly random string) into a hidden field on the form and record this in a session variable on the server as well. When the form is submitted, the two values are compared and the form is only accepted if they match. As soon as the match is found, you then erase the session variable. This means that if they submit the form again the session side variable will be empty, your comparison code will fail, and you can display an appropriate message instead of attempting to process the form. Gary Menzel IT Operations Brisbane -+- ABN AMRO Morgans Limited Level 29, 123 Eagle Street BRISBANE QLD 4000 PH: 07 333 44 828 FX: 07 3834 0828 **************************************************************************** If this communication is not intended for you and you are not an authorised recipient of this email you are prohibited by law from dealing with or relying on the email or any file attachments. This prohibition includes reading, printing, copying, re-transmitting, disseminating, storing or in any other way dealing or acting in reliance on the information. If you have received this email in error, we request you contact ABN AMRO Morgans Limited immediately by returning the email to [EMAIL PROTECTED] and destroy the original. We will refund any reasonable costs associated with notifying ABN AMRO Morgans. This email is confidential and may contain privileged client information. ABN AMRO Morgans has taken reasonable steps to ensure the accuracy and integrity of all its communications, including electronic communications, but accepts no liability for materials transmitted. Materials may also be transmitted without the knowledge of ABN AMRO Morgans. ABN AMRO Morgans Limited its directors and employees do not accept liability for the results of any actions taken or not on the basis of the information in this report. ABN AMRO Morgans Limited and its associates hold or may hold securities in the companies/trusts mentioned herein. Any recommendation is made on the basis of our research of the investment and may not suit the specific requirements of clients. Assessments of suitability to an individual's portfolio can only be made after an examination of the particular client's investments, financial circumstances and requirements. **************************************************************************** --- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] MX Downunder AsiaPac DevCon - http://mxdu.com/
