Y
yuqiaoyan
Hi,
I'm not very familiar with javascript, but I found a script that would
really help with my site. The javascript tool is an image viewer. When
a user clicks on an image, it displays content for the user. But I
can't seem to get the browser to display the HTML code correctly even
though the HTML code works when it's not within javascript code. It
doesn't seem to recognize the valign = 'top' and the text-align =
'left' code. It displays the text in the center of the TD element.
Does anyone have any idea how to force the browser to recognize the
valiang and text-align?
Thanks in Advance!
Imagespace is a div
imagespace.innerHTML = "<table style='width: 500px'>"+
"<tr style='height:200px'>"+
"<td style='width:280px'><img
alt=''src='test.jpg' width='279'
height='200' /> </td>"+
" <td valign='top'
text-align='left'><strong>Title:</strong> Test Test<br />"+
" <strong>Category:</strong> Test Test<br />"+
" <strong>Author:</strong> Test Test<br />"+
" <strong>Date:</strong> 5/25/07</td>"+
"</tr>"+
"<tr>"+
" <td colspan='2'><strong><br />"+
" Description: </strong>Testing................"+
" Testing...................................td>"+
"</tr>"+
"</table>"
I'm not very familiar with javascript, but I found a script that would
really help with my site. The javascript tool is an image viewer. When
a user clicks on an image, it displays content for the user. But I
can't seem to get the browser to display the HTML code correctly even
though the HTML code works when it's not within javascript code. It
doesn't seem to recognize the valign = 'top' and the text-align =
'left' code. It displays the text in the center of the TD element.
Does anyone have any idea how to force the browser to recognize the
valiang and text-align?
Thanks in Advance!
Imagespace is a div
imagespace.innerHTML = "<table style='width: 500px'>"+
"<tr style='height:200px'>"+
"<td style='width:280px'><img
alt=''src='test.jpg' width='279'
height='200' /> </td>"+
" <td valign='top'
text-align='left'><strong>Title:</strong> Test Test<br />"+
" <strong>Category:</strong> Test Test<br />"+
" <strong>Author:</strong> Test Test<br />"+
" <strong>Date:</strong> 5/25/07</td>"+
"</tr>"+
"<tr>"+
" <td colspan='2'><strong><br />"+
" Description: </strong>Testing................"+
" Testing...................................td>"+
"</tr>"+
"</table>"