Closed Bug 178341 Opened 22 years ago Closed 22 years ago

Submit valueOf()/toString() for Objects in Forms

Categories

(Core Graveyard :: Plug-ins, defect, P5)

x86
All
defect

Tracking

(Not tracked)

VERIFIED DUPLICATE of bug 188938
Future

People

(Reporter: bc, Assigned: peterlubczynski-bugs)

References

()

Details

(Keywords: qawanted)

Attachments

(1 file)

The above URL is from bug 178026. This is a continuation/completion of bug 127847.

Click on submit in Mozilla and it will not send any information regarding the
Object contained in the form. IE6 will send the object's name and the toString()
value of the object however. In the case where the method of the form is GET, it
will use the query string: the valueOf()/toString() : ?object1=%5Bobject%5D
One problem here -- valueOf()/toString() are JS methods, no?  The form
submission code only has access to the underlying DOM object, not its JS
wrapper...  Not to mention that our toString() on the wrapper is totally
different from IE's toString().

Thoughts?
We _could_ just hardcode the "%5Bobject%5D" if we really need to...

But what I would really like to do is to investigate the MS docs and see whether
this behavior is for a reason or a side effect of their form submission impl
(and hence liable to change).
Priority: -- → P3
Target Milestone: --- → mozilla1.3beta
I couldn't find any docs in my local install of MSDN library that covered the
behavior of Object in a Form.
Bob, since I don't have IE6, would you mind telling me what query string this
testcase submits?
so er, bz asked me to point out that with ie version 6.0.2800.1106 SP1. i get 
taken to the following url:

http://bugzilla.mozilla.org/tn-127847.html?object1=%5Bobject%5D&object2=%
5Bobject%5D&object3=%5Bobject%5D
The point of that last test was:

1) IE only submits the <object> if some magic rendering condition (loaded data for
   it?) is met.
2) It seems to always submit the value as "[object]" (I tried setting the toString
   on the object, but IE does not allow setting that on <object>s). 

Given that, I don't think this is very urgent (since the value IE submits is
useless; futuring pending a testcase that demonstrates IE submitting something
useful.  (See also comment 2, the "side effect" part.)
Priority: P3 → P5
Target Milestone: mozilla1.3beta → Future
Ok with me if you kill this one off.
then wontfix.  Especially since jrgm says his IE6 SP1 doesn't even submit the
<object>s.  If IE6 can't make up its mind, this is not exactly something people
will depend on.  ;)
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → WONTFIX
verifying
Status: RESOLVED → VERIFIED
Objects are suppose to be submitted according to HTML 4.01 spec:
    Authors may insert generic objects in forms such that associated values are
submitted along with other controls. Authors create object controls with the
OBJECT element.

I dont know much about objects, and why one would want them to submit a value
but it seems like a valid issue, even though IE doesnt support it...
Status: VERIFIED → REOPENED
Resolution: WONTFIX → ---
If you note the HTML spec says nothing about what should be submitted.  Neither
does the DOM HTML spec.  HTMLObjectElement has no .value property in the DOM. 
It has no "value" attribute in the HTML DTD declared for it.

Tell me what should be submitted and I will submit it, but the spec is pretty
useless here.  I could submit the string "screw you" for objects and be
compliant with the spec.
Keywords: qawanted
Perhaps the bug is then the lack of the value property. I asked jkeiser about
this and he said the reason objects are said to be submittable is because these
objects can embed an applet that is a custom form control (color palette for
example), and would want to submit some sort of value (rgb color code in this
case). We should   implement a way to communicate between objects and dom, so
they can set the value to be submitted. 
OK, to plug-ins.  There is no standard for this; we would have to just make up
some bullshit.
Assignee: bzbarsky → peterlubczynski
Status: REOPENED → NEW
Component: Form Submission → Plug-ins
QA Contact: vladimire → shrir
There is already a bug on it, too.

valueOf / toString is most *certainly* not the thing to submit, so this bug in
particular is not valid.  It Makes No Sense.
John, form stuff is your module.  Feel free to resolve the bug.  ;)

*** This bug has been marked as a duplicate of 188938 ***
Status: NEW → RESOLVED
Closed: 22 years ago22 years ago
Resolution: --- → DUPLICATE
verifying.
Status: RESOLVED → VERIFIED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: