Bug Tracker

Modify

Ticket #11554 (closed bug: invalid)

Opened 14 months ago

Last modified 14 months ago

JQuery 1.4.2: 'Object' not defined

Reported by: zwonimir@… Owned by: zwonimir@…
Priority: low Milestone: None
Component: unfiled Version: 1.7.2
Keywords: Cc:
Blocking: Blocked by:

Description

JQuery version: 1.4.2 IE version: 9.0.5

the error "'Object' not defined" happened on the line 87 "toString = Object.prototype.toString," of jquery.js, and it happen only with IE.

It seems that when JQuery is loaded inside an iframe it lose the value of "Object".

Change History

comment:1 Changed 14 months ago by diopralinato

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

Can you use the last version of jQ instead of 1.4.2?

comment:2 Changed 14 months ago by sindresorhus

  • Owner set to zwonimir@…
  • Priority changed from undecided to low
  • Status changed from new to pending

We don't support old versions of jQuery. As mentioned above; please post a simplified jsfiddle testcase that clearly shows the issue using the latest jQuery and jQuery (edge).

comment:3 Changed 14 months ago by zwonimir@…

  • Status changed from pending to new

Oh sorry!! I was wrong ...

I've tryed with the 1.7.2 version.

The page html and JS is so normal and simple, something like:

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="Styles/jquery-ui.custom.css" rel="stylesheet" type="text/css" />
    <link href="Styles/jquery.alerts.css" rel="stylesheet" type="text/css" />

    <script src="Scripts/jquery.min.js" type="text/javascript"></script>
    <script src="Scripts/jquery-ui.custom.min.js" type="text/javascript"></script>
    <script src="Scripts/jquery.alerts.js" type="text/javascript"></script>

    <script type="text/javascript">
        jQuery(document).ready(function () {
                $('.pulsante').button();
        }); 
    </script>
</head>
<body>
    <form id="form1" runat="server">

<asp:Button ID="btnChiudi" runat="server" Text="Chiudi" 
                                    CssClass="pulsante" />
    </form>
</body>
</html>

the trick is that this page is loaded inside an iframe from the parent page and then showed as part of a dialog div:

<script type="text/javascript">
$('#dialog_div_with_iframe').dialog({ autoOpen: false
                                                    , modal: true
                                                    , show: 'clip'
                                                    , hide: 'clip'
                                                    , width: 700
                                                    , height: 200
                });
$('#iframe').attr('src', 'page_iframe.aspx');
$('#dialog_div_with_iframe').dialog('open');
</script>

<div id="dialog_div_with_iframe">
 <iframe id="iframe"></iframe>
</div>

... sorry if I don't use the right tools to communicate this bug, I'm new here and I don't understand well the jsFiddle usage.

Thanks a lot for the support! Zwon

comment:4 Changed 14 months ago by zwonimir@…

SOLVED!

I must open the dialog BEFORE setting the 'src' property of the iframe, so:

$('#dialog_div_with_iframe').dialog('open');
$('#iframe').attr('src', 'page_iframe.aspx');

thx a lot! Zwon

comment:5 Changed 14 months ago by mikesherov

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

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.