I have some code I copied from an example and I am not certain I understand it, and it is giving me an error that didn't happen when I first used is.
On this page:
http://www.comehike.com/hikes/uncancel_hike.php?hike_id=30
I get the error: x is not defined on line 84
I am not too certain what x is supposed to be there. Any help appreciated, especially in helping me understand what is happening here :)
Here is the code:
function getCall(fn, param)
{
return function(e)
{
e = e || window.event;
e.preventDefault(); // this might let you use real URLs instead of void(0)
fn(e, param);
};
}
window.onload = function()
{
var a = document.getElementById("mylink");
a.onclick = getCall(deleteHike, x );
};