new_php85 Posted November 11, 2008 Share Posted November 11, 2008 hai.. i new in js... i need some helps from other resoures to read value in field using javascript can do like this example: me.date_me.value me is form name date_me is field name but if i do like that it will read the whole field.how come if i want only read the 7 character from the field? plzz help me.... Link to comment https://forums.phpfreaks.com/topic/132236-solved-new-in-javascriptneed-help/ Share on other sites More sharing options...
webster08 Posted November 11, 2008 Share Posted November 11, 2008 here is a real simple way to do this: <script type="text/javascript"> function getVal() { var val = me.date_me.value; document.getElementById("field").value = val; } </script> <form name="me"> <input type="text" name="date_me" <input type="hidden" id="field" maxlength="7"> </form> Link to comment https://forums.phpfreaks.com/topic/132236-solved-new-in-javascriptneed-help/#findComment-687553 Share on other sites More sharing options...
new_php85 Posted November 20, 2008 Author Share Posted November 20, 2008 here is a real simple way to do this: <script type="text/javascript"> function getVal() { var val = me.date_me.value; document.getElementById("field").value = val; } </script> <form name="me"> <input type="text" name="date_me" <input type="hidden" id="field" maxlength="7"> </form> thank tou for your information.i got it.. Link to comment https://forums.phpfreaks.com/topic/132236-solved-new-in-javascriptneed-help/#findComment-694149 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.