Orionsbelter Posted March 27, 2013 Share Posted March 27, 2013 hey i am new to JS and can not understand why this isn't working, i'm trying to create a checkbox onClick it runs code and takes values from textfeilds and populates others. I tested the code and the function is been run however the code inside isn't doing as i've asked. function managerDetails(){ document.form1.capName.value = document.form1.manName.value; document.form1.capAddress.value = document.form1.manAddress.value; document.form1.capTown.value = document.form1.manTown.value; document.form1.capPost.value = document.form1.manPost.value; document.form1.capTele.value = document.form1.manTele.value; document.form1.capEmail.value = document.form1.manEmail.value; } Quote Link to comment https://forums.phpfreaks.com/topic/276202-newbie-help/ Share on other sites More sharing options...
haku Posted March 27, 2013 Share Posted March 27, 2013 'Isn't working' is never, ever descriptive enough for a problem. And the less descriptive you are, the less likely it is you will get help for your problem. Please explain again, clearly, exactly what you are trying to do, what you want to happen, and what is happening at the moment. Example: "I am trying to create an onclick listener on a link that will gather the values of the checked checkboxes, serialize them, and submit them to the server. When I click the link, the form is submitted, but the checkboxe values are not sent. I can tell this because my server side script is showing the submitted values as empty" Quote Link to comment https://forums.phpfreaks.com/topic/276202-newbie-help/#findComment-1421298 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.