Reputation: 195
I get the javascript error
SCRIPT16385: Not implemented
When i run the following piece of code..
$j('img[id="edit_destination"]').bind('click',function(){
document.getElementById("edit_destination").onclick = editPRINum(this);
});
editPRINum is a function in the same javascript. I googled the problem and looks like i have to declare in case it is a variable. However i am using this to bind a function. What should i be doing?
Upvotes: 5
Views: 1208
Reputation: 16037
I think you should try this
$j('img#edit_destination').bind('click',editPRINum);
In your callback function (editPRINum), this
will be a reference to the img
element.
PS: What is $j? a shortcut to jQuery?
Upvotes: 3