View Single Post
Old 01-16-2013, 11:37 PM   PM User | #7
DanInMa
Senior Coder

 
DanInMa's Avatar
 
Join Date: Nov 2010
Location: Salem,Ma
Posts: 1,307
Thanks: 12
Thanked 204 Times in 204 Posts
DanInMa is on a distinguished road
[QUOTE=LJackson;1306735]can you see anything wrong with this code
Code:
<a class="deleteRow" onclick="
$('.deleteRow').click
(
    function()
    {
        $.get('/delete.php', function(data){alert('Server Returned: ' + data);});
        return false;
    )
);" 
href="#">Delete</a>
you kinda went the wrong direction there. they way you have it written you are assigning the .click function , when clicking the link. Youve used some of my example, but incorrectly. My example was an attempt to show you how to bind the same action to any element with a class of deleterow, not to an individual row. also im not seeing where you are including the ID, and you are using get instead of post, Im pretty sure you should be using post for this.

give me a few Ill show you maybe an easier way to do this.
__________________
- Firebug is a web developers best friend! - Learn it, Love it, use it!
- Validate your code! - JQ/JS troubleshooting
- Using jQuery with Other Libraries - Jslint for Jquery/other JS library users
DanInMa is offline   Reply With Quote