pkdevbox / iui

Automatically exported from code.google.com/p/iui
MIT License
0 stars 0 forks source link

Input submit buttons always submit forms without ajax #261

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.click <input type=submit/>
2.form is submitted without ajax, regardless of <form target="_self"> not being 
present

What is the expected output? What do you see instead?
Since isn't present, I'd expect the form to submit in the same way it does when 
you click <a type=submit>

Add this code:

addEventListener("submit", function(event)
{
var input = findParent(event.target, "form");
if (input.target == "_self")
{
    input.submit();
    return;  // allow default
}
submitForm(input);
}
, true);

Insert around line 345 between the 2 click event listeners in Version 0.40-dev2

Original issue reported on code.google.com by lictor4@gmail.com on 12 Jul 2010 at 4:48

GoogleCodeExporter commented 8 years ago
This fix is now in a Mercurial clone:
http://code.google.com/r/lictor4-dev/source/detail?r=7d126d4a3f4d740412ff5b50219
75df63f765b8f

Original comment by msgilli...@gmail.com on 16 Jul 2010 at 5:44