misse Posted February 17, 2009 Share Posted February 17, 2009 i have an AJAX function that recieves the element that caused an action using 'this' keyword ==> fuction updates(this);is it possible to retrieve the element id using the following method: var x="?this="+this.value; Link to comment Share on other sites More sharing options...
Synook Posted February 17, 2009 Share Posted February 17, 2009 var x="?this="+this.getAttribute("id"); Link to comment Share on other sites More sharing options...
misse Posted February 17, 2009 Author Share Posted February 17, 2009 var x="?this="+this.getAttribute("id"); thnax for hepl bro , now i have an error when i execute the page says:(object doen't support this property or method) !! Link to comment Share on other sites More sharing options...
jeffman Posted February 17, 2009 Share Posted February 17, 2009 Post your existing code. You may be misusing the 'this' keyword. In any case, it's usually simpler to get an id directly, with element.id . Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.