Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,795
    Thanks
    19
    Thanked 156 Times in 147 Posts

    Changing the properties of a remote page without access to its code

    Do any of you know if there is a way to change, for example, the background color of a page on your site, when that page is, in fact, on somebody else's server and is only viewed on your site via a linked frame? Is there some kind of advanced scripting method I could use to do this? Note: I do not have access to the remote page's code.

    I wasn't sure exactly which forum to post this in, so if the solution doesn't pertain to javascript, God help me.

    Thanx.

  • #2
    Senior Coder
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    1,063
    Thanks
    2
    Thanked 0 Times in 0 Posts
    I thought I had a solution but it doesn't work. I'll try to figure out something. Why do you want this by the way?
    Last edited by shlagish; 01-04-2005 at 09:28 PM. Reason: I made an error
    Shawn

  • #3
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,795
    Thanks
    19
    Thanked 156 Times in 147 Posts
    For purely asthetic reasons, none other.....I'm so shallow, I know it

  • #4
    Regular Coder
    Join Date
    Jan 2004
    Location
    Port Huron, MI, U.S.A.
    Posts
    280
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ..iframe src="remote.htm" id="Fr"></~>
    ...
    window.onload=new Function("document.all.Fr.document.bgColor='blue'");
    OR
    <frame name="main">
    <frame name="ToBremote">
    ...main frame:
    parent.onload=new Function("parent.frames.ToBremote.document.bgColor='blue'");

    if it doesn't work, try ....document.body.bgColor
    Oh, was I supposed to put something here? ........

  • #5
    Senior Coder
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    1,063
    Thanks
    2
    Thanked 0 Times in 0 Posts
    or
    Code:
    document.body.setAttribute("style","background: blue;");
    Shawn


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •