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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.