I have the following code, and it works well on Mozilla 1.6. (However,
the image src property cannot be set on Mozilla 1.2.1).
Unfortunately, all the code:
document.images .itemImage.src = itemInfo.imageU rl;
//document.getEle mentById("itemI mage").src = itemInfo.imageU rl;
document.getEle mentById("descr ").innerHTM L = itemInfo.descr;
document.getEle mentById("price ").innerHTM L = itemInfo.price;
doesn't work on IE. What's the proper way to set them in IE?
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type"
content="text/html; charset=ISO-8859-1">
<title>popup</title>
<script src="items.js" language="JavaS cript"></script>
<script language="javas cript">
<!---
function show_details(ID ) {
var itemInfo = items.getARecor d(ID);
document.images .itemImage.src = itemInfo.imageU rl;
//document.getEle mentById("itemI mage").src = itemInfo.imageU rl;
document.getEle mentById("descr ").innerHTM L = itemInfo.descr;
document.getEle mentById("price ").innerHTM L = itemInfo.price;
}
//--->
</script>
</head>
<body onload="javascr ipt:show_detail s(opener.itemID );">
<table cellpadding="2" cellspacing="2" border="1"
style="text-align: left; width: 100%;">
<tbody>
<tr align="center">
<td style="vertical-align: top;"><img src="na.jpg" title=""
alt="Picture" ID="itemImage"/><br>
</td>
</tr>
<tr>
<td style="vertical-align: top;"><div ID="descr"></div><br>
</td>
</tr>
<tr align="right">
<td style="vertical-align: top;"><div ID="price"></div>
</td>
</tr>
<tr>
<td style="vertical-align: top;"><br>
</td>
</tr>
</tbody>
</table>
<br>
</body>
</html>
the image src property cannot be set on Mozilla 1.2.1).
Unfortunately, all the code:
document.images .itemImage.src = itemInfo.imageU rl;
//document.getEle mentById("itemI mage").src = itemInfo.imageU rl;
document.getEle mentById("descr ").innerHTM L = itemInfo.descr;
document.getEle mentById("price ").innerHTM L = itemInfo.price;
doesn't work on IE. What's the proper way to set them in IE?
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type"
content="text/html; charset=ISO-8859-1">
<title>popup</title>
<script src="items.js" language="JavaS cript"></script>
<script language="javas cript">
<!---
function show_details(ID ) {
var itemInfo = items.getARecor d(ID);
document.images .itemImage.src = itemInfo.imageU rl;
//document.getEle mentById("itemI mage").src = itemInfo.imageU rl;
document.getEle mentById("descr ").innerHTM L = itemInfo.descr;
document.getEle mentById("price ").innerHTM L = itemInfo.price;
}
//--->
</script>
</head>
<body onload="javascr ipt:show_detail s(opener.itemID );">
<table cellpadding="2" cellspacing="2" border="1"
style="text-align: left; width: 100%;">
<tbody>
<tr align="center">
<td style="vertical-align: top;"><img src="na.jpg" title=""
alt="Picture" ID="itemImage"/><br>
</td>
</tr>
<tr>
<td style="vertical-align: top;"><div ID="descr"></div><br>
</td>
</tr>
<tr align="right">
<td style="vertical-align: top;"><div ID="price"></div>
</td>
</tr>
<tr>
<td style="vertical-align: top;"><br>
</td>
</tr>
</tbody>
</table>
<br>
</body>
</html>
Comment