View Single Post
  #1 (permalink)  
Old May 17th, 2005, 11:14 PM
cschng cschng is offline
Registered User
 
Join Date: May 2005
Location: Georgetown, Penang, Malaysia.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem with client side script

i am now doing the asp.net with javascript as client side script.
i have a script as below
<script language="javascript">
function recalStkBal(){
txtStkBal.value=parseFloat(txtOpenbal.value)-parseFloat(txtStkDed.value)
}
</script>

 and with the web control

<asp:textbox name="txtOpenBal">....
<asp:textbox name="txtStkDed">....
<asp:textbox name="txtStkBal">....

 and with code behind

private sub page_load(....)..
txtOpenBal.attribute.add("onBlur","recalStkBal()")

so what i expect is when the user lost focus from the txtOpenBal the "recalStkBal()" should raise and reset the txtStkBal.value to the new value.but i cannot get it so can or any one can help me up? thanks in advance.......


but i do test this code in html page, it seem working well.i try it by run the .aspx page then right click and view code then save as the code as .html it seem working.cause aspx page will render as plain html as run at the server then i test over this code should get the same result right?
Reply With Quote