Web Analytics Made Easy -
StatCounter remote window functions - CodingForum


No announcement yet.

remote window functions

  • Filter
  • Time
  • Show
Clear All
new posts

  • remote window functions

    I cannot firgure out how to write the script to make this popup window control the main browser window beneath via image link within the popup winodw...All the remote scripts I find have th window.open function and I just need to figure out how to control the background window with an image link within the popup window...any help would be very much appreciated!

    here's the problem url...within the popup winodw "Order Now" needs to change the background window to that page without loosing the popup window infront


  • #2
    there are two ways to refer the parent window when using a popup. you can name the parent window by placing this inside the parent window somewhere:

    window.name = "theParent";

    then, you can refer the parent window in links, like so: <A HREF="somepage.htm" TARGET="theParent">.

    you can also refer to the parent window using window.opener, in javascript. in this case, i suggest you use window opener.

    the specific code that you're looking for, would look somewhat like this:

    <A HREF="javascript:window.opener.document.body.style.backgroundImage = 'somePic.gif';"><IMG SRC="somePic.gif"></A>
    placing that in your popup window, would change the background picture of the parent window to somePic.gif. alternatively, you could change the background color using

    HREF="javascript:window.opener.document.body.style.backgroundColor = '#FFCC99';"

    hope that helps.
    bluemood | devedge | devmo | MS Dev Library | WebMonkey | the Guide

    i am a loser geek, crazy with an evil streak,
    yes i do believe there is a violent thing inside of me.


    • #3
      IT WORKED!!!...Thank you soo much man!!