Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- $(formElement).submit(function() {
- ... how to do the jquery stuff..
- return true;
- });
- <?php
- $my_variable_with_value1 = 'abc';
- $my_variable_with_value2 = 'def';
- $another_one_variable = 'mango';
- ?>
- <form method="post" action="process.php">
- <input type="text" id="id1" name="name1" value="<?php echo $my_variable_with_value1 ?>" />
- <input type="text" id="id2" name="name2" value="<?php echo $my_variable_with_value2 ?>" />
- <input type="submit" value="Submit" />
- </form>
- $(formElement).submit(function() {
- <input type="submit" value="Submit" onclick="submitform()" />
- function submitform()
- {
- $('#id1').val('');
- $('form').submit();
- }
- <script type="text/javascript">
- $(formElement).submit(function() {
- $("#Var1").val("");
- $("#Var2").val("");
- return true;
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement