[Javascript] Hopefully quick question.

Hassan Schroeder hassan at webtuitive.com
Sun Oct 4 21:19:46 CDT 2009


Terry Riegel wrote:
> Grrrrr. I was hoping for an answer. But instead I got a question. I  
> used a convience function in my question. But I think Hassan knew that.

No, I was replying to Troy's question -- it had nothing to do with
your original question, since there was none of that included in
that email.

> At the end of the day I am still scratching my head with regards to my  
> question 

Your original question made no sense to me, frankly.

<script>
   var obj=$('mydiv');
   obj.onclick=function() {
    alert(obj.id);
   }
   obj=$('myotherdiv');
</script>

So you want a click event on 'myotherdiv' to alert 'mydiv'? It might
help if you explain your use case more clearly.

-- 
Hassan Schroeder ----------------------------- hassan at webtuitive.com
webtuitive design ===  (+1) 408-621-3445   === http://webtuitive.com
twitter: @hassan
                           dream.  code.



More information about the Javascript mailing list