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 8 of 8
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    113
    Thanks
    0
    Thanked 0 Times in 0 Posts

    style for a link opened page

    I have a link that points to a image.
    Code:
    <a href="images/mypic.gif">Pic1</a>
    is there any way to set the bg color of the page that the image opens in.
    USA

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yes, point the link to a html page which will display the image and have the desired background color.

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    Dallas, Texas
    Posts
    188
    Thanks
    0
    Thanked 0 Times in 0 Posts
    in other words, no, not by just linking to the picture.

    as Roy says, you could make another page just for the picture, and set the background color for that page.

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    113
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks, I will make a page just for images and pass the path of the image so that it can be used for all my pics.
    USA

  • #5
    Regular Coder
    Join Date
    Aug 2002
    Location
    Spain
    Posts
    420
    Thanks
    0
    Thanked 0 Times in 0 Posts
    in fact, with javascript you can change the background from the opener window, but it is better to create a page to show all the images
    Don't resist to assimilation. Billions of Borgs can't be wrong!

  • #6
    Regular Coder
    Join Date
    Jun 2002
    Location
    Dallas, Texas
    Posts
    188
    Thanks
    0
    Thanked 0 Times in 0 Posts
    how would you do that?

  • #7
    Regular Coder
    Join Date
    Aug 2002
    Location
    Spain
    Posts
    420
    Thanks
    0
    Thanked 0 Times in 0 Posts
    an example:

    <a href="images/mypic.gif" onclick="zxs=window.open(this.href);zxs.document.bgColor='#FFCC00';return false">Pic1</a>

    and you can make a function to execute the code, of course
    Don't resist to assimilation. Billions of Borgs can't be wrong!

  • #8
    Regular Coder
    Join Date
    Jun 2002
    Location
    Dallas, Texas
    Posts
    188
    Thanks
    0
    Thanked 0 Times in 0 Posts
    cool. i didn't know you could do that.


  •  

    Posting Permissions

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