[jQuery] Re: Getting this to work with my function and jquery

2008-07-18 Thread EllisGL
Try this: function deleteAjaxAsset(message, assetid) { var asseturl = $(#+assetid.attr(href)); alert(asseturl); var confirmDelete = confirm(message); if(confirmDelete == true) { if(action == delete) { $.ajax( { type : POST, url : asseturl +

[jQuery] Re: Getting this to work with my function and jquery

2008-07-18 Thread EllisGL
er: var asseturl = $(#+assetid).attr(href); On Jul 18, 12:14 pm, EllisGL [EMAIL PROTECTED] wrote: Try this: function deleteAjaxAsset(message, assetid)  {   var asseturl = $(#+assetid.attr(href));   alert(asseturl);   var confirmDelete = confirm(message);   if(confirmDelete == true)  

[jQuery] Re: Getting this to work with my function and jquery

2008-07-18 Thread Mike Alsup
On Jul 18, 12:58 pm, hubbs [EMAIL PROTECTED] wrote: I might be getting confused about the proper use of this.  I thought I understood how this worked, and that since I am triggering the onclick even on an anchor, that the this would be in the context of that anchor tag, so that I could grab

[jQuery] Re: Getting this to work with my function and jquery

2008-07-18 Thread hubbs
Thanks for the help. I do not really want to use an inline onclick, but I am a javascript newbie, and I was unsure how to still pass the two variable to the function if I did not do it inline. How could I rewrite this so that my function will still work, but re-factoring as you say? On Jul 18,

[jQuery] Re: Getting this to work with my function and jquery

2008-07-18 Thread Mike Alsup
I do not really want to use an inline onclick, but I am a javascript newbie, and I was unsure how to still pass the two variable to the function if I did not do it inline. How could I rewrite this so that my function will still work, but re-factoring as you say? You never showed us where

[jQuery] Re: Getting this to work with my function and jquery

2008-07-18 Thread hubbs
Sorry for not clarifying. action=delete is just something that I want sent through in the query string, it has nothing to do with javascript. Let me explain why I am needing this function: I have a large listing of assets that are in my system. I have created a generic delete button bellow