What steps will reproduce the problem?
1. Create an iUI page with a form that successfully submits and takes you to a
valid page.
2. Functionality will cease if a form child element is added that has
name="action" or name="method".
What is the expected output? What do you see instead?
Expected action is for form submission to occur to the form's ACTION parameter,
with the data from the HTML form element named action to be passed along with
all the rest.
Instead, iUI attempts to submit form to the element's property, resulting in a
log entry in my access_log like so:
File does not exist: /var/www/html/[object HTMLInputElement]
and a 404 Not Found error on the device itself.
SOLUTION:
I have fixed iui.js (line 607) by changing:
iui.showPageByHref(form.action, encodeForm(form), form.method || "GET", null,
clear);
to:
iui.showPageByHref(form.getAttribute('action'), encodeForm(form),
form.hasAttribute('method') ? form.getAttribute('method') : 'GET', null, clear);
This solves my problem (I had an element named 'action') as well as the same
potential problem if an element were to be named 'method'.
Original issue reported on code.google.com by eslind...@gmail.com on 29 Jul 2011 at 7:35
Original issue reported on code.google.com by
eslind...@gmail.com
on 29 Jul 2011 at 7:35