scuba_
07-15-2008, 05:06 PM
Hello,
I am trying to make this 'form'/drop downs' change the height and width of a div.
I would like the DIV width equal to "one" and the DIV height equal to "two".
I've tried all sorts of scripts from all over the internet, and I can't make any of them work.
I stripped down the site to make it as simple as possible and rid any scripts that I don't see fit.
Once the total is calculated, and the div is resized, I'd like to be able to submit the result "prod" + "one" + "two" into a formmail.
Thanks in advance for anyone who reads this and can help.
one more thing:
this does not work in FF .. any ideas?
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<SCRIPT LANGUAGE="JavaScript">
function doMath() {
var one = eval(document.theForm.elements[0].value)
var two = eval(document.theForm.elements[1].value)
var prod = one * two
/*alert("The product of " + one + " and " +
two + " is " + prod + ".")*/
size.innerHTML=prod;
}
</script>
<style type="text/css">
<!--
#dynamicDiv {
position:absolute;
left:187px;
top:95px;
width:30px;
height:30px;
z-index:1;
background-color: #99CCCC;
border:solid 0px #ffffff;
background-image:url(http://enstudios.com/images/grid.gif);
}
-->
</style>
</head>
<body>
<div id="dynamicDiv"></div>
<FORM NAME="theForm">
Select Width:
<select name="os0" onchange="doMath()">
<option value="10">10
<option value="20">20
<option value="30">30
<option value="40">40
<option value="50">50
<option value="60">60
</select>
Select Height:
<select name="os1" id="yh" onchange="doMath()">
<option value="10">10
<option value="20">20
<option value="30">30
<option value="40">40
<option value="50">50
<option value="60">60
</select>
<INPUT TYPE="button" VALUE="Add 'em" onClick="doMath()">
</FORM>
<p><span id="size" style="font-family:Tahoma; font-size:40px; color:#ff0000">.</span></p>
</body>
</html>
I am trying to make this 'form'/drop downs' change the height and width of a div.
I would like the DIV width equal to "one" and the DIV height equal to "two".
I've tried all sorts of scripts from all over the internet, and I can't make any of them work.
I stripped down the site to make it as simple as possible and rid any scripts that I don't see fit.
Once the total is calculated, and the div is resized, I'd like to be able to submit the result "prod" + "one" + "two" into a formmail.
Thanks in advance for anyone who reads this and can help.
one more thing:
this does not work in FF .. any ideas?
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<SCRIPT LANGUAGE="JavaScript">
function doMath() {
var one = eval(document.theForm.elements[0].value)
var two = eval(document.theForm.elements[1].value)
var prod = one * two
/*alert("The product of " + one + " and " +
two + " is " + prod + ".")*/
size.innerHTML=prod;
}
</script>
<style type="text/css">
<!--
#dynamicDiv {
position:absolute;
left:187px;
top:95px;
width:30px;
height:30px;
z-index:1;
background-color: #99CCCC;
border:solid 0px #ffffff;
background-image:url(http://enstudios.com/images/grid.gif);
}
-->
</style>
</head>
<body>
<div id="dynamicDiv"></div>
<FORM NAME="theForm">
Select Width:
<select name="os0" onchange="doMath()">
<option value="10">10
<option value="20">20
<option value="30">30
<option value="40">40
<option value="50">50
<option value="60">60
</select>
Select Height:
<select name="os1" id="yh" onchange="doMath()">
<option value="10">10
<option value="20">20
<option value="30">30
<option value="40">40
<option value="50">50
<option value="60">60
</select>
<INPUT TYPE="button" VALUE="Add 'em" onClick="doMath()">
</FORM>
<p><span id="size" style="font-family:Tahoma; font-size:40px; color:#ff0000">.</span></p>
</body>
</html>