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.... Quote 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> Quote 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.. Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.