getting false return when sending data to a php script
I'm trying to send some data to a php file with my jquery script.
However it doesn't seem to work, as I'm getting a false return whatever I'm trying.
Can anyone tell me what I'm doing wrong here?
Please note, the php file isn't doing much.. it's just for testing purposes.
- <script language="javascript">
- $(document).ready(function() {
-
- $('select').change(function() {
-
- if ($(this).val()=='delete'){
- var parent = $(this).closest('tr');
- $.ajax({
- type: 'post',
- dataType: 'html',
- url: 'process.php',
- data: '&delete=' + $(this).attr('id'),
- beforeSend: function() {
- parent.animate({'backgroundColor':'#00B2EE'},300);
- },
- success: function() {
-
- parent.fadeOut(300,function() {
- parent.remove();
- });
- },
- error: function(){
- alert("something went wrong");
- }
- });
- }
- });
-
- });
- </script>
- and my php file contains:
- <?php
- if (isset($_GET["delete"])<>''){
- echo 'cool!';
- return; exit;
-
- }
- ?>