Side navigation
#11431 closed bug (invalid)
Opened March 03, 2012 11:52AM UTC
Closed March 18, 2012 08:20AM UTC
Binding on events to iframe tags from parent window using "on" functions deleagate signature gives error in mozilla
Reported by: | rogsmn@yahoo.co.in | Owned by: | rogsmn@yahoo.co.in |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.7.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Error: Permission denied for <http://siteurl> to get property Attr.value
Source File: http://siteurl/themes/general/js/jquery-1.7.1.min.js
Line: 2
Description: I have a page with an iframe in it. iframe contains a link which when clicked opens a tinybox plugin displaying the contents of another page, but since the space available to iframe is limited so in order to use the full client width of the browser what i have done is that on the loading of iframe i am binding the links inside the iframe using the code given below
if(sender.contentDocument) windowDocument = sender.contentDocument; else windowDocumet = sender.contentWindow.document; windowDocument.domain = document.domain; $(windowDocument.body).on("click",'.lnkdropbox',function(e){ TINY.box.show({iframe:'sitetobeopened',boxid:'frameless',width:$(window).width() - 50,height:$(window).height() - 50,fixed:false,maskid:'bluemask',maskopacity:40,closejs:function(){closeJS()}}); e.preventDefault(); });
The above code is run when the iframes onload event is fired.
This code runs well on IE and Google Chrome, but gives error on Mozilla.
On the contrary if i bind the iframes links using normal click event, it works fine on mozilla but then the functionality breaks on IE and google chrome
Attachments (0)
Change History (2)
Changed March 03, 2012 03:14PM UTC by comment:1
owner: | → rogsmn@yahoo.co.in |
---|---|
status: | new → pending |
Changed March 18, 2012 08:20AM UTC by comment:2
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!
I'm really surprised that works anywhere. You're setting the iframe's document.domain from the parent?
Your code clearly isn't executable since it has typos. Can you post a complete example on jsfiddle.net?