Bug Tracker

Modify

Ticket #11431 (closed bug: invalid)

Opened 15 months ago

Last modified 14 months ago

Binding on events to iframe tags from parent window using "on" functions deleagate signature gives error in mozilla

Reported by: rogsmn@… Owned by: rogsmn@…
Priority: undecided Milestone: None
Component: unfiled Version: 1.7.1
Keywords: Cc:
Blocking: Blocked by:

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

Change History

comment:1 Changed 15 months ago by dmethvin

  • Owner set to rogsmn@…
  • Status changed from new to pending

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?

comment:2 Changed 14 months ago by trac-o-bot

  • Status changed from pending to closed
  • Resolution set to invalid

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!

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.