Hi,
I had a problem on below script which works perfect with MSIE but got error on NN saying -- document.getElementById is not a function.
Here is the script, TIA!
<html>
<head>
<title>Resizing</title>
<script language=javascript>
image_now = document.getElementById("image_now"
function Larger() {
if (document.getElementById("image_now"
.width <=300) {
document.getElementById("image_now"
.height *= 1.10;
document.getElementById("image_now"
.width *= 1.10;
}
}
function Smaller() {
if (document.getElementById("image_now"
.width >=100) {
document.getElementById("image_now"
.height *= 0.90;
document.getElementById("image_now"
.width *= 0.90;
}
}
</script>
</head>
<body bgcolor="ffffff">
<center>
<form method ="post">
<input type="button" value=" Larger" onclick="javascript:Larger();">
<input type="button" value="Smaller" onclick="javascript:Smaller();">
</form>
<!------------------------------------------>
<script language=javascript>
document.write("<img src= id=image_now width=160"+">"
;
</script>
<!------------------------------------------>
</center>
</body>
</html>
I had a problem on below script which works perfect with MSIE but got error on NN saying -- document.getElementById is not a function.
Here is the script, TIA!
<html>
<head>
<title>Resizing</title>
<script language=javascript>
image_now = document.getElementById("image_now"
function Larger() {
if (document.getElementById("image_now"
document.getElementById("image_now"
document.getElementById("image_now"
}
}
function Smaller() {
if (document.getElementById("image_now"
document.getElementById("image_now"
document.getElementById("image_now"
}
}
</script>
</head>
<body bgcolor="ffffff">
<center>
<form method ="post">
<input type="button" value=" Larger" onclick="javascript:Larger();">
<input type="button" value="Smaller" onclick="javascript:Smaller();">
</form>
<!------------------------------------------>
<script language=javascript>
document.write("<img src= id=image_now width=160"+">"
</script>
<!------------------------------------------>
</center>
</body>
</html>