Side navigation
#10105 closed bug (worksforme)
Opened August 22, 2011 10:02AM UTC
Closed September 21, 2011 12:25AM UTC
Last modified March 14, 2012 08:25AM UTC
IE7 attr "name" for iframe + form target
Reported by: | lukasz.zdanikowski@gmail.com | Owned by: | lukasz.zdanikowski@gmail.com |
---|---|---|---|
Priority: | low | Milestone: | None |
Component: | attributes | Version: | 1.6.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Create iframe element with jQuery(1.6.2) -without name attribute - and then set name attribute with attr().
If there is form element with target set to name of that iframe, submitting form does not work properly (it opens new window) istead of opening result in that iframe.
I don't add jsfiddle code because it works properly.
It looks like it's because iframe is created with attribute submitName="something" istead name="something"
(see also ticket #8418)
Attachments (0)
Change History (7)
Changed August 22, 2011 10:27AM UTC by comment:1
component: | unfiled → attributes |
---|---|
owner: | → lukasz.zdanikowski@gmail.com |
priority: | undecided → low |
status: | new → pending |
Changed August 22, 2011 02:57PM UTC by comment:2
simple test case
https://github.com/henry150/jquery-jquery_ie7_iframe_form_target
Click lower button and everything is as expected but when you click first button another window is opened.
Changed September 06, 2011 07:48AM UTC by comment:3
resolution: | → invalid |
---|---|
status: | pending → closed |
Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!
Changed September 06, 2011 08:16AM UTC by comment:4
Replying to [comment:3 trac-o-bot]:
hmmm I've included test case in comment 2
Changed September 06, 2011 06:02PM UTC by comment:5
resolution: | invalid |
---|---|
status: | closed → reopened |
Changed September 21, 2011 12:25AM UTC by comment:6
resolution: | → worksforme |
---|---|
status: | reopened → closed |
I've added your code here to test and it seems to work fine: http://jsfiddle.net/timmywil/PBUBV/1/show
Changed September 21, 2011 06:23AM UTC by comment:7
Replying to [comment:6 timmywil]:
I've added your code here to test and it seems to work fine: http://jsfiddle.net/timmywil/PBUBV/1/show
You'r right :-) at jsfiddle it works properly - as I wrote in description.
From what i know now case with:
#!js $('<iframe></iframe>').attr({'name' : 'iframe1'});
can't be solved because in IE7 it's not possible to add name attribute after creating node, that's why submitName attribute is set.
But the case with:
#!js $('<iframe></iframe>', {'name': 'iframe4'});
can be solved by firstly creating string
#!text/html <iframe name='iframe4'></iframe>
and creating node from that html string. But it looks like jQ does the same in both cases. Firstly it creates node and then attributes are set.
Thanks for submitting a bug report, but we'll need some form of test case to reproduce this - either on jsFiddle or an uploaded file (ideally the former, but I read your note regarding it working fine there). Please also ensure you test with jQuery git/edge to ensure its broken there too.