Creating same text value for two text fields
-
Hi, In my form, I have two text fields called txt1 and txt2. I am using javascript pop up calender and creating date value for txt1 and calling a function onchange="popVal()" in txt1. function popVal(){ window.document.form1.txt2.value = window.document.form1.txt1.value } this does not insert the txt1 date value into txt2. I tried onblur, onfocus as well. can any body help?! I will be most greatful. Thank you. Bravo Two Zero A pen is mighter then a sword.
-
Hi, In my form, I have two text fields called txt1 and txt2. I am using javascript pop up calender and creating date value for txt1 and calling a function onchange="popVal()" in txt1. function popVal(){ window.document.form1.txt2.value = window.document.form1.txt1.value } this does not insert the txt1 date value into txt2. I tried onblur, onfocus as well. can any body help?! I will be most greatful. Thank you. Bravo Two Zero A pen is mighter then a sword.
BravoTwoZero wrote: and calling a function onchange="popVal()" in txt1. function popVal(){ window.document.form1.txt2.value = window.document.form1.txt1.value } This won't work as you have noted when you are setting the values programmtically. No "event" has taken place for that function to be called. I would assume that you are either loading the pop up calendar either with the onLoad event or by clicking a button. I would suggest that you add an additional function call to check the value of txt1 after the function has returned, then populate txt2. Hope this helps. Nick Parker
May your glass be ever full. May the roof over your head be always strong. And may you be in heaven half an hour before the devil knows you’re dead. - Irish Blessing