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

Buttons that do things

  Pass text box value to javascript function when a button is pressed <script language="javascript"> //—– PLAY —– function vlc_play(uri1) { vlc_player1.play(uri1); } </script> <input id='uri' value='http://www.some_domain.com/duck.mp4' size=70 type='text'><button onclick="vlc_play($('#uri').val())">Play</button>      

Read More

Submit form

document.getElementById(‘uploaded_dest_file_name’).value=”[var.upload_filename]”; document.forms[“form_upload_complete”].submit();

Read More

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