Advertisement
Guest User

Untitled

a guest
Apr 20th, 2014
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. <script type="text/javascript">
  2. $(formElement).submit(function() {
  3. ... how to do the jquery stuff..
  4. return true;
  5. });
  6.  
  7. <?php
  8. $my_variable_with_value1 = 'abc';
  9. $my_variable_with_value2 = 'def';
  10. $another_one_variable = 'mango';
  11. ?>
  12. <form method="post" action="process.php">
  13. <input type="text" id="id1" name="name1" value="<?php echo $my_variable_with_value1 ?>" />
  14. <input type="text" id="id2" name="name2" value="<?php echo $my_variable_with_value2 ?>" />
  15. <input type="submit" value="Submit" />
  16. </form>
  17.  
  18. $(formElement).submit(function() {
  19.  
  20. <input type="submit" value="Submit" onclick="submitform()" />
  21.  
  22. function submitform()
  23. {
  24. $('#id1').val('');
  25. $('form').submit();
  26. }
  27.  
  28. <script type="text/javascript">
  29. $(formElement).submit(function() {
  30. $("#Var1").val("");
  31. $("#Var2").val("");
  32. return true;
  33. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement