Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script src="jquery.js" type="text/javascript"></script>
- <script type="text/javascript">
- $(document).ready( function() {
- function StuffSelect(id) {
- document.getElementById(id).focus();
- document.getElementById(id).select();
- }
- $('#chatform').submit( function() {
- var data = []
- $('#chatform :input').each( function() {
- var key = $(this).attr('name');
- var val = $(this).attr('val');
- data[key] = val;
- });
- $.ajax( { url : 'index.php',
- type : 'POST',
- data : data,
- }
- success : function(data) {
- alert('yes');
- }
- error : function(data) {
- alert("something went wrong");
- }
- );
- return false;
- });
- );
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement