On Jan 22, 7:22 am, John Resig <[email protected]> wrote:
> Nevermind, it's right there in the source, heh.
>
> --John
>
> On Wed, Jan 21, 2009 at 6:22 PM, John Resig <[email protected]> wrote:
> > What version of jQuery are you hitting this in, as well?
>
> > --John
>
> > On Wed, Jan 21, 2009 at 4:45 PM, gMinuses <[email protected]> wrote:
>
> >> When i try to reference a textarea in the parent window, for the first
> >> time it will return 'undefined', and will return '[object
> >> HTMLTextAreaElement]' thereafter. This happens to both Firefox 3.0.5
> >> and IE 7.0.5730.13 under XP SP3.
>
> >> Here are the two html files;
>
> >> ----------------------------------------------------------------------------------------------------------------------------------
> >> parent.html:
>
> >> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> >> "http://www.w3.org/TR/html4/loose.dtd";>
> >> <html xmlns="http://www.w3.org/1999/xhtml";>
> >>    <head>
> >>        <meta http-equiv="Content-Type" content="text/html;
> >> charset=utf-8" />
> >>                <title>Parent</title>
> >>    </head>
> >>    <body>
> >>                <div id="sign-in">
> >>                        <input type="submit" value="Ignore this" />
> >>                        <input type="reset" value="Ignore this" />
> >>                </div>
> >>                <div id="main">
> >>                        <iframe src="child.html" frameborder="no"></iframe>
> >>                </div>
> >>                <div id="editor">
> >>                        <textarea rows="10" cols="30"></textarea>
> >>                        <input type="submit" value="Ignore this" />
> >>                        <input type="reset" value="Ignore this" />
> >>                </div>
> >>                <script type="text/javascript" 
> >> src="http://ajax.googleapis.com/ajax/
> >> libs/jquery/1.3/jquery.min.js"></script>
> >>                <script type="text/javascript">
> >>                $("#sign-in input[type=reset]").click(function() {
> >>                        $("#sign-in").fadeOut("slow");
> >>                });
> >>                </script>
> >>    </body>
> >> </html>
>
> >> ----------------------------------------------------------------------------------------------------------------------
> >> child.html:
>
> >> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/
> >> TR/html4/strict.dtd">
> >> <html>
> >>        <head>
> >>                <meta http-equiv="Content-Type" content="text/html; 
> >> charset=utf-8">
> >>                <title>Child</title>
> >>        </head>
> >>        <body>
> >>                <div>
> >>                        <input id="button" type="button" value="This should 
> >> never prompt
> >> 'undifined' ">
> >>                </div>
> >>                <script type="text/javascript" 
> >> src="http://ajax.googleapis.com/ajax/
> >> libs/jquery/1.3/jquery.min.js"></script>
> >>                <script type="text/javascript">
> >>                        $.fn.test = function() {
> >>                                alert(this[0]);
> >>                        };
> >>                        $("#button").click(function() {
> >>                                $("#editor 
> >> textarea",parent.document).test();
> >>                        })
> >>                </script>
> >>        </body>
> >> </html>
>
> >> ------------------------------------------------------------------------------------------------------------
> >> I'm not sure if it has something to do with my settings, let me know
> >> if you experience the same thing. Thank you.

It happens to 1.3.1 here either.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to