wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes Setting background image of table column Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Setting background image of table column" Watch "Setting background image of table column" New topic
Author

Setting background image of table column

Yans Tan
Greenhorn

Joined: Jul 11, 2006
Posts: 29
Hi there!

I am currently facing some problems with setting the background of the column with an image object. I wonder is there even a way to do this?
Now i am doing this:

document.getElementById(3).style.background = "url('images/m2_last.png')";

Trying to do smth like this:

document.getElementById(3).style.background = "data:image/jpeg;base64,"+ vector.get(0);

Thanks for all your help in advance
[ July 26, 2006: Message edited by: Yans Tan ]
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Looks an aweful lot like HTML to me. Moving to the HTML / Javascript forum.


GenRocket - Experts at Building Test Data
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

document.getElementById(3).style.background = "url('images/m2_last.png')";

The only problem I see in this is the 3. Is that really the id of the element?

Yans Tan
Greenhorn

Joined: Jul 11, 2006
Posts: 29
Hi there!

Yes I that is my element id. Bad naming though. Anyway, any idea about the second part? I found some new methods of doing it, but still not what i wanted.

Method found:
document.getElementById("myImage").src="hackanm.gif"

What I wanted:
document.getElementById("myImage").src= myImageObject
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Setting background image of table column
 
Similar Threads
Changing tbl background with click on jpg/gif
change background color of hyperlinks!!
window print problem
Color in JTable
change bgcolor of row dynamically ???