I want to get the id of this element so I can use it. How would I do it? (I want the <a> to have no id yet still be able to be called from javascript) Example: Javascript function imgover(name) { document.getElementById(name).style.cursor = 'pointer'; } Code (markup): <a onmouseover="imgover('this')">link here</a> HTML: Is this even possible? Thanks. ~imozeb
But there could be any number of <a> tags on my page. Is there anyway I can pass along a referer in the function call?
you can of course but not 'this' // <a onmouseover="imgover(this);">link here</a> // using this as scope for function, no " " var imgover = function(el) { if (!el) return; // needs to be an object, in our case the callee = a el.style.cursor = 'pointer'; // for ie this needs to be el.style.cursor = 'hand'; iirc }; Code (javascript): however, you don't need to do the cursor stuff, just add a href as # and it will automatically do the cursor for you.