Please look at the form below - I want to APPEND something to the value in the "keyword" field BEFORE submit. For example, say the user inputs, "Car Video" in the keyword field, it must change to, "American Car Video" before pressing submit. Or in other words, I want the text "American" added in the front of whatever the input is on the keyword field and then submit that value.. another example: Building Video must become American Building Video.. PLEASE HELP - thanks in advance.. Following is the code.. <div id="upload_form"> <div> <form enctype="multipart/form-data" method="post" action="" name="frmUpload" id="frmUploadVideoDesc"> <table width="100%"> <tr> <td width="30%">Title:</td> <td><input type="input" id="title" name="title" value=""></td> </tr> <tr> <td>Video Description:</td> <td><input type="input" id="desc" name="desc" value=""></td> </tr> <tr> <td>Video Category:</td> <td> <select name="cat"> <option value="Film">Film & Animation</option> <option value="Autos">Autos & Vehicles</option> </select> </td> </tr> <tr> <td>Keyword:</td> <td><input type="input" id="keyword" name="keyword" value=""></td> </tr> <tr> <td> </td> <td><input type="submit" value=" Upload " name="btnSubmit"/></td> </tr> </tbody></table> </form> Code (markup):
Probably by defining: <form enctype="multipart/form-data" method="post" action="" name="frmUpload" id="frmUploadVideoDesc" [B][COLOR="#FF0000"]onsubmit="return onsubmitf();"[/COLOR][/B]> ... Code (markup): And declaring onsubmitf() in the <head> section of your html: <script type="text/javascript"> function onsubmitf(){ document.frmUpload.keyword.value = "American " + document.frmUpload.keyword.value; return true; } </script> Code (markup): Something like that?