Javascript Desc:
This Script helps to Reassign the old/previous value if the end user filled the empty value in form, when he try to submit again
-------------------------------------------
line1: script language="javascript">
line2: !-- var oldvalue=""; function onfocus_Region(nowValue){
line3: oldvalue=nowValue.value;nowValue.value=""; }
line4: function onblur_Region(nowValue){
if(nowValue.value=="")nowValue.value=oldvalue;
line5: } -->
line6: /script>
line7: form name="form1" action="" method="post">
line8: input onblur="javascript:onblur_Region(this);" onfocus="javascript:onfocus_Region(this);" name="textfield">
line9: /form>
Note:
Add "<" in the lines.
No comments:
Post a Comment