Javascript Help
<form name="form1"> <select name="S1" size="4" onchange="document.form1.T1.value ='Cost:' + this.value"> <option value="0.99">Pencil</option> <option value="3.99">Paper</option> <option value="4.99">Pens</option> <option value="1.99">Ruler</option> <select><BR> <input type="text" name="T1" value="Pick an item above"> </form>
OK, with that coding, it works fine and everything, but I am trying to change the width/height of the input type value. I can't figure out how to do it. Well, I am like also trying to make it change size depending on the text, and can't manage to figure it out. Google hasn't been help either.
Just set the CSS "width" property to whatever you want… For example:
var blah = document.getElementById("id");
blah.style.width = (10 * yourSelect.value.length) + "px";
Which would make the box big enough for however many characters there are, assuming their all 10 pixels wide.