Problem with html form in a Gadget on FireFox

2 views
Skip to first unread message

boaz

unread,
Jan 4, 2010, 2:33:05 PM1/4/10
to Google Wave API
Hello,

I have a gadget with a simple form whose ACTION attribute is set to an
empty string:

<FORM NAME=ColorSelection ACTION=""><P>


<INPUT TYPE=RADIO NAME="Color" VALUE="Red">red<BR>
<INPUT TYPE=RADIO NAME="Color" VALUE="Blue">blue<BR>
<INPUT TYPE=RADIO NAME="Color" VALUE="Green">green<P>

<button id="chooseColor" onclick="buttonClicked()">Select</button>

</FORM>


This works fine on Chrome, but on FireFox after clicking on the
button, buttonClciked() is called correctly but then the gadget is
replaced by the error message:
No container specified.
Error 404

I managed to work-around this by putting the button out of the form,
but this is not a clean solution.

Has anyone encountered a similar issue?

Thank you,
Boaz

Dan

unread,
Jan 4, 2010, 6:17:39 PM1/4/10
to Google Wave API
It should work if you put:

<button type="button" id="chooseColor" onclick="buttonClicked
()">Select</button>

If you don't include type="button" then the default is assumed, which
is type="submit" - so the form is actually being submitted and that's
throwing the error as the action is empty.

boaz sapir

unread,
Jan 5, 2010, 9:01:48 AM1/5/10
to Google Wave API
Thank you, this solution does work.

Note that normally an empty action is legal and is equivalent to the
current document's address (see
http://stackoverflow.com/questions/1131781/blank-html-form-action-posting-back-to-self
for example), and it does work fine if you use it on FireFox or Chrome
in a standalone HTML document (not in Wave), and in Chrome it works
also inside a Gadget.

Reply all
Reply to author
Forward
0 new messages