Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Change Cell Bg Image With A Link
Old 08-17-2006, 06:14 PM Change Cell Bg Image With A Link
Junior Talker

Posts: 4
Name: crytal
Trades: 0
I have limited knowledge so be kind.

I would like to be able to change a cell background image by clicking on a image link (the link is written in javescript).

I have no idea how to do this - can someone help me please.

Thanks
Cryztal
cryztal is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-17-2006, 06:52 PM Re: Change Cell Bg Image With A Link
Coulix's Avatar
Average Talker

Posts: 16
Trades: 0
Hey, i made an example for you

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Change bg link</title>
<style type="text/css">
#td_with_special_bg {
 width: 200px;
 height: 200px;
 background-image: url("oldimage.jpg");
}
</style>
<script type="text/javascript">
function bg_Change() {
  document.getElementById("td_with_special_bg").style.backgroundImage = 'url("newimage.jpg")';
}
</script>
<head>
<body>
<table><tr><td id="td_with_special_bg">
<a href="#" onClick="bg_Change()">Change background image</a>
</td></tr></table></body>
</html>
__________________
NorthCube, Webtechnology from the north.

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
.
To avoid criticism do nothing, say nothing, be nothing. - Elbert Hubbard, 1856 - 1915.
Coulix is offline
Reply With Quote
View Public Profile
 
Old 08-17-2006, 07:21 PM Re: Change Cell Bg Image With A Link
Junior Talker

Posts: 4
Name: crytal
Trades: 0
ok I see that works fine - now I need to specify a specific cell named fcell1
Sorry I didn't mention that to begin with.

Can you help with that?

Cryztal
cryztal is offline
Reply With Quote
View Public Profile
 
Old 08-18-2006, 12:52 AM Re: Change Cell Bg Image With A Link
Novice Talker

Posts: 9
Trades: 0
Quote:
Originally Posted by cryztal View Post
I have limited knowledge so be kind.

I would like to be able to change a cell background image by clicking on a image link (the link is written in javescript).

I have no idea how to do this - can someone help me please.

Thanks
Cryztal
Hopefully this site can be of help to you. Cell Border and BG change [Archive] - CodingForums.com
__________________
Check out
Please login or register to view this content. Registration is FREE
encryptplanet is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Change Cell Bg Image With A Link
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.34009 seconds with 12 queries