Hi,
I am using AJAX to return a response which includes a script.
Through that script, how can I determine the ID of the parent element the script is running in without passing id's to the server? Is there a way?
Thanks.
Hi,
I am using AJAX to return a response which includes a script.
Through that script, how can I determine the ID of the parent element the script is running in without passing id's to the server? Is there a way?
Thanks.
If you assign an ID to the script (which will explode in ancient browsers), you can try:
var id = $("#idOfTheScript").parent()[0].id;