This is a discussion on Identifiying the type of elements in a web page within the HTML, CSS and Javascript Coding Techniques forums, part of the Web Development category; Hi can any one tell me how to identify the type of an element in the web page during the ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Hi can any one tell me how to identify the type of an element in the web page during the rollover event...? ie., i need to display a message saying that, "mouse is on the 'xxx' element the xxx may be a div, h1, a, p or what ever it is
__________________ SeeSamJagan- Sky is not the "LIMIT", Death is not the END, There is still something beyond.... |
| Sponsored Links |
| |||
| Hi, we can find the element in mouse over using javascript, we have to call a function on BODY's mouseover event. here is the simple example for your need. <HTML> <HEAD> <SCRIPT language="javascript"> function whichelement(elem) { var x = event.clientX var y = event.clientY if (window.event.srcElement.name) status = window.event.srcElement.name; else status = ""; } </SCRIPT> </HEAD> <BODY onmouseover="whichelement()"> <form> <textarea name="TextArea" wrap="off" cols=12 rows=4> This is line 1 This is line 2 This is line 3 </textarea> <br> <input type="text" name="Text1" value="mytextvalue"> <br> <input type="text" name="Text2" value="othertextvalue"> </form> </BODY> </HTML> i hope this will help you.... thnx... |
| |||
| Hi, Thanks for your reply, its working fine!
__________________ SeeSamJagan- Sky is not the "LIMIT", Death is not the END, There is still something beyond.... |
| |||
| Hi, Its working fine in IE but not in FireFox...? What is the problem in the code , Which attribute is not supporting in FF!
__________________ SeeSamJagan- Sky is not the "LIMIT", Death is not the END, There is still something beyond.... |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how can i set content type in jsp page.? | saravanan | Java Server Pages (JSP) | 3 | 09-21-2008 09:25 AM |
| call xml elements in php | Vani Sri | PHP Programming | 11 | 03-11-2008 06:29 AM |
| 'Page' ia an unambiguous reference between 'System.Web.UI.Page' and 'Project1.Page' | poornima | ASP and ASP.NET Programming | 1 | 03-05-2008 03:12 AM |
| What is Value type and reference type in .Net? | anbuchezhians | VB.NET Programming | 2 | 08-21-2007 10:42 PM |
| ASP with paging elements | kingmaker | HTML, CSS and Javascript Coding Techniques | 1 | 07-19-2007 12:32 AM |