Closed Bug 183890 Opened 23 years ago Closed 23 years ago

submit values' button don't get submitted after javascript checks

Categories

(Core :: DOM: Core & HTML, defect, P1)

x86
Linux
defect

Tracking

()

VERIFIED FIXED
Future

People

(Reporter: lists, Assigned: john)

References

()

Details

Attachments

(1 file, 2 obsolete files)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021130 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021130 In page http://mail.interzone.gr/mozdemo.html there are three submit buttons Submit2 directly submits the form. After pushing that button, you may see the location bar that writes the full query_string (it's a "get" for that reason). The submit's name is also included (testmsg=Submit2) Submit1 and Submit3 both call a javascript which checks if at least one message is selected, asks for confirmation, and then submits the form. Unfortunately, the form gets submitted without the submit's name. The javascript is in http://mail.interzone.gr/sc/jscripts.js You may of course press the buttons on will (there is no script behind that) Reproducible: Always Steps to Reproduce: 1. select at least one checkbox 2. press "submit1" 3. press "ok" on the popup js dialog 4. Watch the location bar to see the full query_string 5. go back 6. press submit2 7. Watch the location bar to see the full query_string, correct this time Actual Results: The "submit" name/value pair is not submitted Expected Results: The "submit" name/value pair should be submitted as on the button that does not go through the js script Checked with Konqueror 3.0.0, works all right Checked with Netscape Navigator 4.8 (Linux), works all right A friend checked with some IE (I thinks it was 5), works all right.
Pressing submit1/submit3 does not submit at all, in either Mozilla or Netscape 4. This is probably a duplicate of bug 138957, but hard to test given the lack of submission. ;)
Hi I just checked again. It DOES submit, but you must have been tricked from the check for selected messages. Click on any one of the checkboxes, press submit1, ok on the js popup and then it submits. If you wish, I will remove that check from the js
Ah. My apologies. I missed step #1 in the steps to reproduce.... This is _not_ fixed in Linux trunk build 2002-12-04-22. Over to Form Submission.
Assignee: rogerl → alexsavulov
Status: UNCONFIRMED → NEW
Component: JavaScript Engine → Form Submission
Ever confirmed: true
QA Contact: pschwartau → vladimire
on it
Status: NEW → ASSIGNED
this regressed in with the patch for bug 147878 ( i didn't thought about event bubbling - my foult).
i thought i can save there a packed bool but i was wrong, i forgot about event bubbling. damn!
wait i have an idea, maybe i can do somthing to save a packed bool. need to see if i can check if i'm in an onSubmit event in the form control.
Attachment #108517 - Attachment is obsolete: true
there you go. this was the mistake I made. waht was I thinking? be cause of event bubbling the flag is to be reset only if we are in the form's onSubmit.
Depends on: 147878
Comment on attachment 108520 [details] [diff] [review] the better patch for the regression onbug 147878 - needs to land on 1.3a too this was my mistake, didn't thought about it. please review!
Attachment #108520 - Flags: review?(jkeiser)
Comment on attachment 108520 [details] [diff] [review] the better patch for the regression onbug 147878 - needs to land on 1.3a too eek!
Attachment #108520 - Flags: review?(jkeiser) → review+
Comment on attachment 108520 [details] [diff] [review] the better patch for the regression onbug 147878 - needs to land on 1.3a too i missed one check so event bubbling was canceling the flag at the wrong moment - my mistake.
Attachment #108520 - Attachment description: the better patch - needs to land on 1.3a too → the better patch for the regression onbug 147878 - needs to land on 1.3a too
Attachment #108520 - Flags: superreview?(jst)
> + /** Whether the submission is to be defered be cause is from a script*/ "because" is one word
Comment on attachment 108524 [details] [diff] [review] the better patch for the regression onbug 147878 now with corrected comment transfering jkeiser's review
Attachment #108524 - Flags: review+
Attachment #108520 - Flags: superreview?(jst)
Comment on attachment 108524 [details] [diff] [review] the better patch for the regression onbug 147878 now with corrected comment boris, i asked jst for sr= be cause he sr'ed the previous patches too, but if you want you can do that too. thanks for the hint.
Attachment #108524 - Attachment description: corrected comment → the better patch for the regression onbug 147878 now with corrected comment
Attachment #108524 - Flags: superreview?(jst)
hmmm, there is something about this "be caue" i keep using that space there. not intentionally though. :-)
Attachment #108524 - Flags: superreview?(jst) → superreview+
Comment on attachment 108524 [details] [diff] [review] the better patch for the regression onbug 147878 now with corrected comment the patch on bug 147878 caused this regression so this one needs to go in.
Attachment #108524 - Flags: approval1.3a?
Although I've lost you (sorry, I'm not a programmer in that level) I think that I have to mention that: there are at least 5 ways to do exactly the same thing (and all of these must work). a) use the onSubmit to the form. b) use the onClick to a submit buton (input type=submit onclick...) c) use the onClick to a button buton (input type=button onclick...) d) use the onClick to an image buton (input type=image onclick...) e) use the onClick to a plain buton (button onclick...) I'm not sure your solution handles the last three ones (again, I'm not a programmer, sorry if I add overhead with that comment). BTW I couldn't think of a workaround. Is there any? Thanks Michalis.
Comment on attachment 108524 [details] [diff] [review] the better patch for the regression onbug 147878 now with corrected comment >- /** Whether the submission was triggered by an Image or Submit*/ >+ /** Whether the submission is to be defered in case a script triggers it*/ "deferred", not "defered" Space before */ please. Fix these nits and a=brendan@mozilla.org for 1.3a checkin -- do it soon, we're trying to wrap 1.3a up. /be
Attachment #108524 - Flags: approval1.3a? → approval1.3a+
-> jkeiser
Assignee: alexsavulov → jkeiser
Status: ASSIGNED → NEW
Priority: -- → P1
Target Milestone: --- → Future
verifying on linux 2003-02-12-10-trunk
Status: RESOLVED → VERIFIED
Component: HTML: Form Submission → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: