I have three scenarios that seem to suggest a bug in chrome for form
submission, please see example code below

1. form.submit with a named target opens a new tab the first time with
the submitted data.
subsequent attempts fail to open a new tab (or pull in the submitted
data to the pre-existing tab)

2. form.submit with target=foobar opens a new tab the first time
subsequent attempts post the new submission data to the pre-existing
tab, as it should.
if we close the tab.. then submit again, it fails to open a new tab.

3. form.submit with target=_blank opens a new tab the first time.
form.submit with no target successfully downloads a file.
form.submit with target=_blank now successfully opens a new tab! (the
same is true if target=foobar both times and we close the tab).

Are there any known issues with chrome form submission? It all works
correctly in safari, firefox and ie.

Sincerely,

 Alexander

Example code:

<html xmlns="http://www.w3.org/1999/xhtml";>
       <head>
               <meta http-equiv="content-type" content="text/
html;charset=utf-8" />
   <script language='JavaScript'>
     function submitForm() {
       form = document.getElementById('myform');
       form.action = "http://www.google.com/search";;
       form.target = 'google';
       form.submit();
     }

     function downloadForm() {
       form = document.getElementById('myform');
       form.action = 'file.csv';
       form.target = 'self';
       form.submit();
     }
   </script>
</head>
<body>
   <form id="myform" method='GET'>
     <input type='hidden' name='q' value='git5' />
   </form>

   <a href="#" onclick='downloadForm()'>download<a>
   <a href="#" onclick='submitForm()'>submit<a>
</body>
</html>

-- 
Chromium Developers mailing list: [email protected] 
View archives, change email options, or unsubscribe: 
    http://groups.google.com/group/chromium-dev

Reply via email to