The HTML is -

<ul id="content_header_tools">
        <li id="tools_contact_us"><a href="{path="contact-us/index"}">Contact
Us</a></li>
        <li id="tools_email_page"><a href="{path="email-page/index"}"
rel="email_page">Email Page</a></li>
        <li id="tools_print_page"><a href="javascript:window.print();">Print
Page</a></li>
</ul>

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');
        return false;
});

$('a[rel="share_story"], a[rel="video_story"]').click(function(){
        
window.open(this.href,'mywindow','height=580,width=400,scrollTo,resizable=0,scrollbars=0,location=0','false');
        return false;
});

$('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;
});

// This passes along the URL of the parent opener when clicking "Email
this page"
$("#message").get(0).value += window.opener.location.href;

On Sep 26, 10:31 am, ricardobeat <[EMAIL PROTECTED]> wrote:
> 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(){
>
> > 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
> > carried across.
>
> > On Sep 26, 2:46 am, ricardobeat <[EMAIL PROTECTED]> wrote:
>
> > > 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="email_page"]').click(function(){
>
> > > > window.open(this.href,'mywindow','height=580,width=400,scrollTo,resizable=0,scrollbars=0,location=0','false');
> > > >         return false;
>
> > > > });
>
> > > > // This passes along the URL of the parent opener when clicking "Email
> > > > this page"
> > > > $("#message").get(0).value += window.opener.location.href;
>
> > > > but it seems to be causing a conflict in the rest of my code.
>
> > > > My Firebug console log says -
> > > > $("#message").get(0) is undefined
>
> > > > If I comment out the line, everything works nicely.
>
> > > > Any idea if I can get rid of this error and still retain the
> > > > functionality?

Reply via email to