Hi ) For example I have: <input type="text" name="name" onclick="some_func_1();"> <input type="text" name="phone" onclick="some_func_2();"> Code (markup): But I don't want to use a particular event-handler for each tag. I want to have one common event-handler for onclick-event that could be generated in both of "<input>" tags. And then my handler will do different things depending on which tag the event was generated for. How can I figure out in my event-handler which tag the event was generated for?
Hi Blue8sky. The following example should help you: <script language="Javascript" type="text/javascript"> function [B]some_func()[/B] { alert([B]event.srcElement[/B].name); } </script> <input type="text" name="name" onclick="[B]some_func();[/B]"> <input type="text" name="phone" onclick="[B]some_func();[/B]"> Code (markup): Is that what you need?