oulan / iui

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

Strange form behavour with target="_self" #208

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Aplication invoked via a homescreen icon.
2. Page contains a form with target="self" and anchor used as submit button
with href="#". 
3. Click 'submit' button.
4. Backend send a complete new page
5. Next screen opens in a new page and address bar keeps showing up!

What is the expected output? What do you see instead?
New page should replace existing page in same session, not switch to
'browser' mode in a new window/session.

What version of the product are you using? On what operating system?
iui 0.40 dev2 on an ipod touch, v3.1.2 of OS.

Please provide any additional information below.
Demo code attached.

Original issue reported on code.google.com by ltlfr...@gmail.com on 22 Dec 2009 at 11:56

Attachments:

GoogleCodeExporter commented 9 years ago
Actually, the expected output is that the newly returned page will open in 
Mobile Safari (rather than within the 
webapp)  
If you want to submit a form and stay within the same webapp you should do it 
via Ajax.

Original comment by msgilli...@gmail.com on 27 Dec 2009 at 7:35

GoogleCodeExporter commented 9 years ago
see bug 210 for a fix

Original comment by jad.hon...@gmail.com on 30 Dec 2009 at 6:06

GoogleCodeExporter commented 9 years ago
Issue 210 has been merged into this issue.

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

GoogleCodeExporter commented 9 years ago
Update: Issue #210 does not provide fix.

Original comment by msgilli...@gmail.com on 22 Mar 2012 at 6:22

GoogleCodeExporter commented 9 years ago
There seem to be at least two workarounds for this problem:
1) If possible, use an input[type="submit"] tag for your submit button.
2) If you are using a a[type="_submit"] tag for your submit button and can't 
use workaround #1, add href="javascript:{};" to the a tag.

Original comment by msgilli...@gmail.com on 22 Mar 2012 at 6:30

GoogleCodeExporter commented 9 years ago

Original comment by msgilli...@gmail.com on 22 Mar 2012 at 6:30

GoogleCodeExporter commented 9 years ago
I think iUI and all iUI apps should migrate to using input[type=submit] rather 
than a[type=submit] for form submission.  I created Issue #332 for this 
proposal and have written code to make the migration possible.  That code also 
seems to fix this issue.

Original comment by msgilli...@gmail.com on 12 Apr 2012 at 7:32