1 Replies - 1554 Views - Last Post: 17 September 2012 - 08:33 AM

#1 guyfromri  Icon User is offline

  • D.I.C Addict

Reputation: 46
  • View blog
  • Posts: 817
  • Joined: 16-September 09

Closing greybox and passing variables to main page?

Posted 16 September 2012 - 10:13 PM

Hey everyone! I'm having a bit of difficulty with my greybox plugin and I was wondering if anyone could offer some ideas.

I have 2 a greybox that opens with a link(internal to my site). Once the link is clicked, I want the greybox to close and the mainpage header to redirect. I've tried a small script but it closes the greybox then does nothing. I've tried it with the greybox callback and within the script. It either opens the new page in the greybox or closes the greybox and does nothing else... Any input would be greatly appreciated.

Thanks!

  xmlhttp.onreadystatechange=function(){
    if(xmlhttp.readyState==4 && xmlhttp.status==200){
      if(xmlhttp.responseText==1){                
        parent.parent.GB_hide();
        UpdatePostsDiv()
        setCookie("PBdy", PostBody.value, 365);        
      }
    }
  } 



Is This A Good Question/Topic? 0
  • +

Replies To: Closing greybox and passing variables to main page?

#2 guyfromri  Icon User is offline

  • D.I.C Addict

Reputation: 46
  • View blog
  • Posts: 817
  • Joined: 16-September 09

Re: Closing greybox and passing variables to main page?

Posted 17 September 2012 - 08:33 AM

SOLVED::

Turns out there's a much easier way to do this and I found it :)

<a href = "whatever" target = "_top"></a>



Works like a charm -- hope it helps someone else :)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1