JavaScript - Disable Warning on Html Form Reload?

Asked By Heaven's Martini on 10-Aug-15 03:17 PM
i have no idea where i would ask this.
When you press reload on your browser and you are on a form page, it will ask you if you want to reload (short version).
Is there some feature in the browser where I can turn that off, or can i do it in code.
I fire a small popup where a user selects something, the parent then reloads with the new data in it.  that damn message pops up sometimes, but not always.
What causes it?

Sounds a little like preventing form submit - Asked By Peter Bromberg on 22-Aug-01 08:27 PM

I know Robbe and I came up with some javascript (i think its in the code snippets section) to prevent a form from being submitted twice. I also have an article here you could draw from detailing how to tell if a form is "dirty".

So the short anwer is , if you post some sample code I am sure you'll get some good reponses!

Okay then............... - Asked By Heaven's Martini on 20-Jul-14 01:12 AM

I don't think example code will get me anywhere, the combination of code is so basic, but the damn message is irritating.

to call the popup window function
function myopen(archivevar) 
  { 
    if(archivevar.length < 1)
      archivevar = 0;

    var popupWindow = open(popuppath+'?archive='+archivevar,'popupWindow','resizable=no,width=400,height=165,left=200,top=100'); 
if (popupWindow.opener == null) 
     popupWindow.opener = self; 
  } 


The popup window has a very basic form in it.
(no reason to post that.  the form contains a textbox)

the popup submits to another page

which has a request of the textbox
<%
  if (request.form("name") = 0) then 
    Session("caseid") = ""
  else
    Session("caseid") = request.form("name")
  end if
%>


<head>
<title></title>
</head>



and this simply reloads the opener and closes the popup window.

I will scrounge more, but i am trying to get around the damn message.

Could - Asked By Krank on 24-Aug-01 02:36 PM

do opener.document.formname.submit() instead of the reload however if any changes made to the form while the popup is up well then get a different answer. Could prevent this by disabeling the form elements on window popup and set a lsitner in the opener page to listen for the closing of the popup to enable the form elements again, actually don't even need to do this just resubmit the form on the page unload event of the popup.
ahh, the weekend - Asked By Heaven's Martini on 20-Jul-14 01:12 AM
its hard to explain this.  The forms, as they are are written so the active caseid is loaded into them.  The session var i set in the popup forces the reload using the "new" session var or case that was chosen.  

Not sure what I can do, when you push the "Refresh" button on your browser it does the same thing, with the message, wish i could stop that, but doubt i can.