Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-15-2003, 03:42 PM   PM User | #1
landon11
Regular Coder

 
Join Date: Jun 2002
Location: USA
Posts: 113
Thanks: 0
Thanked 0 Times in 0 Posts
landon11 is an unknown quantity at this point
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
landon11 is offline   Reply With Quote
Old 01-15-2003, 04:41 PM   PM User | #2
Roy Sinclair
Senior Coder

 
Join Date: Jun 2002
Location: Wichita
Posts: 3,880
Thanks: 0
Thanked 0 Times in 0 Posts
Roy Sinclair will become famous soon enough
Yes, point the link to a html page which will display the image and have the desired background color.
Roy Sinclair is offline   Reply With Quote
Old 01-15-2003, 05:08 PM   PM User | #3
applesauce
Regular Coder

 
Join Date: Jun 2002
Location: Dallas, Texas
Posts: 188
Thanks: 0
Thanked 0 Times in 0 Posts
applesauce is an unknown quantity at this point
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.
applesauce is offline   Reply With Quote
Old 01-15-2003, 05:41 PM   PM User | #4
landon11
Regular Coder

 
Join Date: Jun 2002
Location: USA
Posts: 113
Thanks: 0
Thanked 0 Times in 0 Posts
landon11 is an unknown quantity at this point
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
landon11 is offline   Reply With Quote
Old 01-15-2003, 07:10 PM   PM User | #5
Borgtex
Regular Coder

 
Join Date: Aug 2002
Location: Spain
Posts: 420
Thanks: 0
Thanked 0 Times in 0 Posts
Borgtex is an unknown quantity at this point
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!
Borgtex is offline   Reply With Quote
Old 01-15-2003, 09:48 PM   PM User | #6
applesauce
Regular Coder

 
Join Date: Jun 2002
Location: Dallas, Texas
Posts: 188
Thanks: 0
Thanked 0 Times in 0 Posts
applesauce is an unknown quantity at this point
how would you do that?
applesauce is offline   Reply With Quote
Old 01-15-2003, 11:55 PM   PM User | #7
Borgtex
Regular Coder

 
Join Date: Aug 2002
Location: Spain
Posts: 420
Thanks: 0
Thanked 0 Times in 0 Posts
Borgtex is an unknown quantity at this point
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!
Borgtex is offline   Reply With Quote
Old 01-16-2003, 01:25 PM   PM User | #8
applesauce
Regular Coder

 
Join Date: Jun 2002
Location: Dallas, Texas
Posts: 188
Thanks: 0
Thanked 0 Times in 0 Posts
applesauce is an unknown quantity at this point
cool. i didn't know you could do that.
applesauce is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:31 PM.


Advertisement
Log in to turn off these ads.