Jump to content

newbie help


Orionsbelter

Recommended Posts

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;
}
Link to comment
https://forums.phpfreaks.com/topic/276202-newbie-help/
Share on other sites

'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"

Link to comment
https://forums.phpfreaks.com/topic/276202-newbie-help/#findComment-1421298
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.