Adding a variable to a form

Create the form <form id=”my_form_name” name=”my_form_name” method=”post” action=”http://www.mydomain.com/destination_page.php”> <input type=”hidden” name=”form_parameter1″ id=”form_parameter1″ value=”” /> <!– etc… –> </form> Create the variable <script type=”text/javascript”> var parameter1 = ‘TEST’; </script> To load the form field with the varaible document.getElementById(‘form_parameter1’).value=parameter1; //If you want to auto submit the form document.forms[“my_form_name”].submit();

Read More

Select Box

Causing Form To Submit OnChange Call function when selection changed Which item is selected? Show / Hide page elements depending on Select box item chosen PHP Javascript

Read More

Submit form

document.getElementById(‘uploaded_dest_file_name’).value=”[var.upload_filename]”; document.forms[“form_upload_complete”].submit(); Don’t relaod page when submitting a form that calls a javascript function

Read More