I am trying to move some text by clicking a button. When clicked the button
runs the java script and this will then take the value in the text field and
add 10 to it to create a new value, this is then used to move the text
(id=h1) to a new position and to display the new value in a text field. My
script is below but does not work. Im new to javascrip and there is probably
something embarasingly obviour that Im missing. Can anyone help
Ian
<SCRIPT TYPE="text/javascript">
<!--
function move(amount) {
var texttop=document.form2.xh1.value;
var x = new getObj('h1');
texttop += amount;
x.style.top = texttop;
document.form2.xh1.value=texttop;
}
// -->
</SCRIPT>
<input name="xh1l" type="button" class="BodyText"
onclick="javascript:move(10)" value="<">
<input name="xh1" type="text" class="BodyText" value="<?php echo
$row['xh1']; ?>" size="1">
<div id="h1">some text</div>