• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Setting background image of table column

 
Yans Tan
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks an aweful lot like HTML to me. Moving to the HTML / Javascript forum.
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic