473,385 Members | 1,320 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

ie : form submits happening multiple times

Plater
7,872 Expert 4TB
I'm going to stab myself in the face.
I have a page with a single form.
Regular old html.
There are a few checkboxes and textboxes and and two submit buttons (I hope that's not the issue...)
The form submits to itself (I control the backend so I handle it)

When I click the submit button, the form is submitted and I get my page back with a "form submitted" text in a certain place.
As SOON as it finishes loading, it automatically submits itself again.
Using a packet watcher I can see that the request seems to be identical. Both use POST and contain the same content data.
Before that NEW request has finished loaded, it loads the page a THIRD time, this time using a GET request and no content data.

This is very aggrivating. It only appears to happen in ie (I've only test on ie6 though). There is no javascript on the page.

A few more notes:
The page is in a privleged zone so the AUTH header gets sent (it's in there and validated just fine, the "200 ok" is returned to each request without a challenge)
The pages are all marked as no-cache

Anyone heard of this? I gave a quick check on the net and got one hit back to a newsgroup but nothing was resolved.
Nov 29 '07 #1
14 3771
Death Slaught
1,137 1GB
I can't tell where or what your problem is without your code, so please post it.

Thanks, Death
Nov 29 '07 #2
Plater
7,872 Expert 4TB
It's just a basic form?
Expand|Select|Wrap|Line Numbers
  1. <form method="post" name="nalarmsconfig" id="alarmsconfig">
  2.  
  3. <input type="checkbox" name="nAlarmsEnabled" id="AlarmsEnabled"  checked="checked"  />
  4. <textarea name="nEmailList" id="EmailList" cols="40" rows="8" >user@domain.com</textarea><br />
  5. <select name="nAlarmsStart" id="AlarmsStart">
  6.     <option value="0">12:00 AM</option>
  7.     <option value="0">12:00 AM</option>
  8.     <option value="60">1:00 AM</option>
  9.     <option value="120">2:00 AM</option>
  10.     <option value="180">3:00 AM</option>
  11.     <option value="240">4:00 AM</option>
  12.     <option value="300">5:00 AM</option>
  13.     <option value="360">6:00 AM</option>
  14.     <option value="420">7:00 AM</option>
  15.     <option value="480">8:00 AM</option>
  16.     <option value="540">9:00 AM</option>
  17.     <option value="600">10:00 AM</option>
  18.     <option value="660">11:00 AM</option>
  19.     <option value="720">12:00 PM</option>
  20.     <option value="780">1:00 PM</option>
  21.     <option value="840">2:00 PM</option>
  22.     <option value="900">3:00 PM</option>
  23.     <option value="960">4:00 PM</option>
  24.     <option value="1020">5:00 PM</option>
  25.     <option value="1080">6:00 PM</option>
  26.     <option value="1140">7:00 PM</option>
  27.     <option value="1200">8:00 PM</option>
  28.     <option value="1260">9:00 PM</option>
  29.     <option value="1320">10:00 PM</option>
  30.     <option value="1380">11:00 PM</option>
  31. </select><br />
  32. <select name="nAlarmsStop" id="AlarmsStop">
  33.     <option value="1080">6:00 PM</option>
  34.     <option value="0">12:00 AM</option>
  35.     <option value="60">1:00 AM</option>
  36.     <option value="120">2:00 AM</option>
  37.     <option value="180">3:00 AM</option>
  38.     <option value="240">4:00 AM</option>
  39.     <option value="300">5:00 AM</option>
  40.     <option value="360">6:00 AM</option>
  41.     <option value="420">7:00 AM</option>
  42.     <option value="480">8:00 AM</option>
  43.     <option value="540">9:00 AM</option>
  44.     <option value="600">10:00 AM</option>
  45.     <option value="660">11:00 AM</option>
  46.     <option value="720">12:00 PM</option>
  47.     <option value="780">1:00 PM</option>
  48.     <option value="840">2:00 PM</option>
  49.     <option value="900">3:00 PM</option>
  50.     <option value="960">4:00 PM</option>
  51.     <option value="1020">5:00 PM</option>
  52.     <option value="1080">6:00 PM</option>
  53.     <option value="1140">7:00 PM</option>
  54.     <option value="1200">8:00 PM</option>
  55.     <option value="1260">9:00 PM</option>
  56.     <option value="1320">10:00 PM</option>
  57.     <option value="1380">11:00 PM</option>
  58. </select><br />
  59. <input type="checkbox" name="nEnablePowerFailure" id="EnablePowerFailure"  checked="checked" /> 
  60. <input type="checkbox" name="nEnableSagSurge" id="EnableSagSurge" checked="checked" /> 
  61. <input type="text" name="nSagThresh" id="SagThresh"  value="0"/>
  62. <input type="text" name="nSurgeThresh" id="SurgeThresh"  value="0"/>
  63. <input type="checkbox" name="nEnableNGVoltage" id="EnableNGVoltage" checked="checked" />
  64. <input type="text" name="nNGMAX" id="NGMAX"  value="0"/>
  65. <input type="checkbox" name="nEnableTransPeak" id="EnableTransPeak" checked="checked" />
  66. <input type="text" name="nTransSplit" id="TransSplit"  value="0"/>
  67. <input type="text" name="nTransShort" id="TransShort"  value="0"/>
  68. <input type="text" name="nTransLong" id="TransLong"  value="0"/>
  69.  
  70.  
  71. <input type="checkbox" name="nEnableTemp" id="EnableTemp" checked="checked" />
  72. <input type="text" name="nMinTemp" id="MinTemp"  value="0"/>
  73. <input type="text" name="nMaxTemp" id="MaxTemp"  value="0"/>
  74. <input type="checkbox" name="nEnableHumidity" id="EnableHumidity" onclick="DoCheck(this);"  checked="checked" />
  75. <input type="text" name="nMinHumid" id="MinHumid"  value="0"/>
  76. <input type="text" name="nMaxHumid" id="MaxHumid"  value="0"/>
  77. <input type="checkbox" name="nEnableAirP" id="EnableAirP" onclick="DoCheck(this);"  checked="checked" />
  78. <input type="text" name="nMinAirP" id="MinAirP"  value="0"/>
  79. <input type="text" name="nMaxAirP" id="MaxAirP"  value="0"/>
  80.  
  81. <input type="submit" name="nbtSave" id="btSave" value="Save" />
  82. <input type="submit" name="nbtTrigger" id=btTrigger" value="Trigger/Test" />
  83. </form>
  84.  
There is no action in the FORM because it posts back to itself.
There are two submits buttons, but the value of the NON-clicked one is not passed so it doesn't appear to be getting triggered.
The problem only seems to occur when the checkboxes are checked, as opposed to not checked?
Nov 30 '07 #3
Death Slaught
1,137 1GB
On your 82nd line of code you're missing a " qoute in your id.

Thanks, Death

PS - if you want the form to submit to itself you have to give it the action attribute.

action="nameOfFile.html"
Nov 30 '07 #4
Plater
7,872 Expert 4TB
good eye on that id, I'd missed it myself.
I made both of those changes, unfortunatly it's still doing it.

It's related to content size somehow. I just tested it with one textarea. A small amount of text and it doesn't do it. A LARGE amount of text and it does the POST/POST/GET request pattern.
Nov 30 '07 #5
Death Slaught
1,137 1GB
I don't know what to tell you. Have you tried validating it?

- Death
Dec 1 '07 #6
Plater
7,872 Expert 4TB
I got a video cap of what it is doing. (It's not exactly the same every time)
You will see it reload a blank page (with background color) (Uses the POST from the form)
Then start to reload the page correctly, with the words "Settings saved" at the top, but stop before it completely loads it.(Uses POST method still)
It then will make a GET request for the page and let it load entirely.

Unfortuantly it is too big to attach:
FormSubmitWoes
Dec 4 '07 #7
drhowarddrfine
7,435 Expert 4TB
I don't see anything wrong with the html you show, other than the validation problems. html can't submit anything on its own so the problem must lie somewhere else.
Dec 4 '07 #8
Plater
7,872 Expert 4TB
I don't see anything wrong with the html you show, other than the validation problems. html can't submit anything on its own so the problem must lie somewhere else.
Yea, with IE (your favorite subject hehe)
FF doesn't do it, just IE and just with the content being long (haven't found the cutoff point for it)
I don't know it expected me to issuse multiple replies and segment it out, but it never sends any of the CONTINUE headers, and I reply back with Connection: Close in the header too.

I might just have to switch to xmlhttprequest for submition, it didn't have that problem.
Dec 4 '07 #9
Plater
7,872 Expert 4TB
Now it seems that if the content amount is long enough IE just goes to a blank white page and does nothing. If it's a little less content, it does the multiple post thing.

My latest solution:
Expand|Select|Wrap|Line Numbers
  1. <span class="Example">Internet Explorer users may experiance some flickering durring the save process</span>
  2.  
Dec 4 '07 #10
drhowarddrfine
7,435 Expert 4TB
See if anything here is related. Scroll down to " FORM and FORM-related Elements issues'
Dec 4 '07 #11
Plater
7,872 Expert 4TB
See if anything here is related. Scroll down to " FORM and FORM-related Elements issues'
Hmm, I *DO* have two input type="submit" buttons, but I am not seeing the behavior described were they both get sent (only the one clicked gets sent as part of the content).
I might remove one button and see if it still happens.

EDIT: Still happens with one button, only less frequently?
Dec 5 '07 #12
Death Slaught
1,137 1GB
Just out of curiousity, why not just use JavaScript for this?

Thanks, Death
Dec 5 '07 #13
Plater
7,872 Expert 4TB
You mean use XMLHttpRequest ? I have been using it for other pages, but I've built the content string manually.
If there's a good way to take a reference to a FORM and automate getting all of it's name=value pairs, I'm listening. I would prefer to not have to build the string by hand, using document.getelelementbyid for like 30values will stink enough, not to mention that I need to specify all the IDs manually too.
Dec 5 '07 #14
Death Slaught
1,137 1GB
I'm sure there is a way to do it without that much typing, of course I may be wrong. Ask in the JavaScript forum, if any one knows how to do it, it would be Acoder, and Gits.

Thanks, Death
Dec 5 '07 #15

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: chinagirl | last post by:
I have a javascript that displays couple of buttons, which are directional (e.g., click button it goes to a particular page). I need to have these buttons shows up multiple times in same page,...
0
by: Jonathan Duke | last post by:
I have written a custom session state provider that stores session data in XML in a SQL database , and I was running the SQL profiler to verify that all of my stored procedures were called in the...
22
by: Brett Romero | last post by:
If my UI app uses three DLLs and two of those DLLs reference something named utilities.dll, does the UI app load utilities.dll twice or does the compiler recognize what is going on and load...
6
by: yk | last post by:
Hi, Is it a technique available in html/javascript in order to display same image many many times on a same page? Because of a large page loading I am looking for a way not to have same...
6
by: Mangler | last post by:
I created a barcode: <% RMABarCode = Request.Form("idrma") IF Len(RMABarCode) Then response.write "<img src='barcode.asp?code=" & RMABarCode & "&height=25&width=1&mode=code39'>" End If %> ...
5
by: billa856 | last post by:
Hi, My project is in MS Access 2002. In that I want to open one form multiple times. I put one button on my main form. Now whenever I click on that button than form will be open. Now when I...
6
by: 0utlawza | last post by:
Hi Guys It seems i posted this in the incorrect topic, so i am reposting here. Please excuse the Newbie question. I am not really a programmer so excuse me if i dont clarify my point...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.