SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member snyx's Avatar
    Join Date
    Mar 2001
    Location
    Vancouver, BC, Canada (whistler.2010)
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    hardchange the background of an iframed page outside your own server

    I have a cross sale page I'm required to open in an iframe on my website. My sites background is a purple and their sales page is a simple white. Together it's quite obvious (well, more so) that a white box on purple background is an outside sale. I want to know if there is a way I can hard edit their background into my purple through css, a js or the iframe. I have asked them specifically if they would change the page color for me, but allot of people use the same page so they said I would need to find another option.

    Thoughts?>
    Thank you..

  2. #2
    He's No Good To Me Dead silver trophybronze trophy stymiee's Avatar
    Join Date
    Feb 2003
    Location
    Slave I
    Posts
    23,424
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    I'm not an expert in this area but I bet you could use the DOM to change the background color. You'll need a JavaScript guru to help you out with that.

  3. #3
    SitePoint Member snyx's Avatar
    Join Date
    Mar 2001
    Location
    Vancouver, BC, Canada (whistler.2010)
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    could someone bump me to the JS forum? =)

  4. #4
    He's No Good To Me Dead silver trophybronze trophy stymiee's Avatar
    Join Date
    Feb 2003
    Location
    Slave I
    Posts
    23,424
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    I've put in the request.

  5. #5
    SitePoint Addict
    Join Date
    Nov 2003
    Location
    Malmoe, Sweden
    Posts
    265
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    As long as the page you are 'framing' and the your page conforms to JavaScripts Same Origin Policy itīs no problem but otherwise you have to find a more advanced solution including server side handling i.e. your server gets their page and parses it, setting the background and pushes it out. There can be legal issues about this and thatīs an area Iīm no good at ;-)

    You can read about JavaScripts Same Origin Policy in 'Client-Side JavaScript Guide - Version 1.3' or probably use Google.


Bookmarks

Posting Permissions

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