hello, i have some innerHTML questions here. you see i have an html page that i load in an swt browser. this page is made up of tables and is styled with css. now what i want is to add rows to the bottom of that table so i do this in my
java code:
browser.execute (
"var x = document.getElementById('table_1').insertRow (document.getElementById('table_1').rows.length);\r\n");
which works well. Then what i do is this:
browser.execute ("
var newCell = x.insertCell (0);
img.innerHTML = '<th>Name</th>';
var nextCell = x.insertCell (1);
nextCell.innerHTML = '<td>input: <br> <input> </input></td>';
");
the problem is my css gets applied to those inside td (like in text colors, form color,etc.) but it doesnt get applied to the th. i would like to set my th attribute to something such that <th class = "name"> </td> but i cant seem to find the correct syntax for it. i already tried:
img.setAttribute ('class', 'name');
but it doesnt work. what should i do? thanks.
----------------------------------------------------
another question, since i need to have things working, i also tried this:
browser.execute (
"img.style.fontSize = '100%';\r\n" +
"img.style.color = 'red';\r\n" +
"img.style.fontFamily = 'arial';\r\n" +
)
which effectively sets my th attributes. but i dont know the attribute which would make my th letters bold. what do i put in here: img.style.________ to make it bold? and also, i want to fill my th with an image, using img.style.backgroundColor = 'red', i am able to fill it with red but how do i fill it with an img? thanks.
i really really need help with this one, i can't seem to find the correct answers!!!thanks. i will appreciate any help. thanks.