Markis Taylor asked:
>Are you trying to figure out which cell in the table was clicked or
>were you trying to find the exact x, y coordinates of where the mouse
>clicked in the table?
No, I don't need the exact coordinates. I'd just like to divvy up a
larger element into components and know which one is being manipulated.
Jim Ley wrote:
> If you've got a permanent home then all the better, but there's
> nothing particularly wrong with just linking to the file even if you
> can't guarantee it's permanent, I certainly wouldn't use it to stop
> you asking, or pasting too much in the post!
As long as my questions are really basic I doubt anybody will miss
seeing my files afterwards, so I won't worry about it now. I might only
need to know a little bit of JAvaScript after all. This thing I posted
about might be useful in prototyping something that I'll then rewrite in
something else.
> createAttribute is not a good way to create event handlers.
>
> x.onclick=functionRef
>
> is much better, it's debateable if createAttribute should even create
> an event handler...
>
Thanks for the advice. I need to read my references more carefully to
spot basics like x.onclick!
> It would probably just be better to catch a single click at a higher
> level, and then see which element was actually clicked...
>
Can you give an example or a simple outline of how to implement this
cleanly in Javascript? Doesn't this involve manipulating coordinates or
something similar? I'd like a solution that does not require special
knowledge of how big things are (in pixels), and probably I'm not just
seeing what you are suggesting properly.
Thanks for the responses.
--
Pekka Karjalainen - Oulu, Finland
Received on Tue Oct 18 03:07:15 2005