dmaru09 Posted July 1, 2009 Share Posted July 1, 2009 I'm making a new system for my company.. making an input form currently. What I am trying to do is make a checkbox that when unchecked makes two fields cleared and invisible. <TR> <TD> <input type='checkbox' onclick=\"document.getElementById('text12').value='';\" onclick=\"document.getElementById('text1').value='';\" onPropertyChange='showHide(whatever);' /> </td> <TD> <INPUT TYPE='text' id='text1' NAME='a_due_date_1' VALUE='".$_SESSION['due_date_1']."' SIZE='20'></TD> </TD> <TD><INPUT TYPE='text' id='text12' NAME='a_payment_1' VALUE='".$_SESSION['payment_1']."' SIZE='20'></TD> <TD><P CLASS='error'>".$_SESSION['e_due_date_1']."</TD> </TR> The way this currently works is both field are invisible when unchecked, which is what I want to happen. (Javascript uptop controls that) -- not the prob. The problem is that when checked/unchecked the only field that is cleared is 'text12' as that is the field that comes first. --- Doesn't matter if both fields are identified by text12, thats why I made them both have different names. Link to comment https://forums.phpfreaks.com/topic/164383-more-of-a-javascript-question-but/ Share on other sites More sharing options...
947740 Posted July 1, 2009 Share Posted July 1, 2009 Um...could we see the HTML output instead? Link to comment https://forums.phpfreaks.com/topic/164383-more-of-a-javascript-question-but/#findComment-867128 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.