• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Setting background image of table column

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Looks an aweful lot like HTML to me. Moving to the HTML / Javascript forum.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic