change a class of an object at runtime

E

Eitan

Hello,
I am creating a table cell on runtime.
I want to change the style, so it will look and react like a button.
(style = "border-style: outset").

1) How can I create a button or any element on a cell ?
2) How can I change the style behaviour of a cell ?
3) Can I change the class-name of the cell on runtime ?

Thanks :)
 
T

tennisbill

Well, with regard to question 3), the following javascript works for
me:
document.getElementById('theButton').className = "newClassName";
 
M

Mick White

Eitan said:
Hello,
I am creating a table cell on runtime.
I want to change the style, so it will look and react like a button.
(style = "border-style: outset").

1) How can I create a button or any element on a cell ?

element.style.borderStyle="outset" (I've never heard of this style)

2) How can I change the style behaviour of a cell ?

See above
3) Can I change the class-name of the cell on runtime ?
element.className="yourClassName"

Mick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,434
Messages
2,571,685
Members
48,796
Latest member
Greg L.

Latest Threads

Top