[jQuery] Re: Get parent url and add to a textarea

2008-09-29 Thread stinhambo
You Sir are a genius! Thank you so much :) On Sep 27, 5:00 am, ricardobeat <[EMAIL PROTECTED]> wrote: > Ok. Your instance of jQuery is living in the parent window, so you > need to reference it from inside the pop-up. > > Use this inside your pop-up code: > > > $ = window.opener.$; > $(window).

[jQuery] Re: Get parent url and add to a textarea

2008-09-26 Thread ricardobeat
Ok. Your instance of jQuery is living in the parent window, so you need to reference it from inside the pop-up. Use this inside your pop-up code: $ = window.opener.$; $(window).load(function(){ $('#message',document).val(window.opener.location.href); }); Working on FF3 here - ricardo O

[jQuery] Re: Get parent url and add to a textarea

2008-09-26 Thread stinhambo
The HTML is - Contact Us Email Page Print Page and this is part of what sits in my external file - $('a[rel="video_demo"]').click(function(){ window.open(this.href,'mywindow','height=460,width=400,scrollTo,resizable=0,scrollbars=0,location=0','false'); retur

[jQuery] Re: Get parent url and add to a textarea

2008-09-25 Thread ricardobeat
Now I'm completely lost. Could you post a test page? So where exactly is $("#message").get(0).value += window.opener.location.href; running? On Sep 25, 4:29 pm, stinhambo <[EMAIL PROTECTED]> wrote: > Not at the moment. If I put it inside this - > > $('a[rel="email_page"]').click(function(){ > >

[jQuery] Re: Get parent url and add to a textarea

2008-09-25 Thread stinhambo
Not at the moment. If I put it inside this - $('a[rel="email_page"]').click(function(){ window.open(this.href,'mywindow','height=580,width=400,scrollTo,resizable=0,scrollbars=0,location=0','false'); return false; }); the popup comes up but the parent also loads the form and no URL gets

[jQuery] Re: Get parent url and add to a textarea

2008-09-25 Thread ricardobeat
Is this line $("#message").get(0).value += window.opener.location.href; running from inside the popup? On Sep 25, 8:48 am, Stinhambo <[EMAIL PROTECTED]> wrote: > I am having some problems with that bit of code. > > Basically I am launching a popup window and this is my js file - > > $('a[rel="e

[jQuery] Re: Get parent url and add to a textarea

2008-09-25 Thread Stinhambo
I am having some problems with that bit of code. Basically I am launching a popup window and this is my js file - $('a[rel="email_page"]').click(function(){ window.open(this.href,'mywindow','height=580,width=400,scrollTo,resizable=0,scrollbars=0,location=0','false'); return false; });

[jQuery] Re: Get parent url and add to a textarea

2008-09-23 Thread ricardobeat
$('#message") returns a jQuery object, which is 'array-like' (as the docs say). Arrays start at position zero, so [0] is asking for the first element in the array (which happens to be the only one). For example, $('#list li')[2] would give you the 3rd element from that object. Note that this give

[jQuery] Re: Get parent url and add to a textarea

2008-09-23 Thread Stinhambo
Wow that's great and it works too! What is the square bracket and zero for? On Sep 23, 11:14 pm, BB <[EMAIL PROTECTED]> wrote: > The smallest thing would be: > > $("#message")[0].value += window.opener.location.href; > > On 23 Sep., 15:09, Stinhambo <[EMAIL PROTECTED]> wrote: > > > I managed to

[jQuery] Re: Get parent url and add to a textarea

2008-09-23 Thread BB
The smallest thing would be: $("#message")[0].value += window.opener.location.href; On 23 Sep., 15:09, Stinhambo <[EMAIL PROTECTED]> wrote: > I managed to achieve what I wanted with this - > > document.getElementById('message').value += > window.opener.location.href; > > in the jquery file but I

[jQuery] Re: Get parent url and add to a textarea

2008-09-23 Thread Stinhambo
I managed to achieve what I wanted with this - document.getElementById('message').value += window.opener.location.href; in the jquery file but I can't work out the proper jquery way. I'd love to know! On Sep 23, 9:42 pm, Stinhambo <[EMAIL PROTECTED]> wrote: > Hi all! > > I have some js that op