Question: Find currenly which field is having focus on html page?

Ads

 
 
 

Share on Google+Share on Google+

Navnath
Find currenly which field is having focus on html page?
1 Answer(s)      7 years ago
Posted in : Ajax
Ads
View Answers

July 6, 2009 at 5:03 PM


Hi Friend,

Try the following code:

<html>
<head>
<script>
function whichBlur(f){
alert(f)}
</script>
</head>
<body>
<form name=Form1 method="post">
<input name="Form1" type="submit" value="Form1" onfocus="whichBlur(this.name)">
</form>
<form name=Form2 method="post">
<input name="Form2" type="submit" value="From2" onfocus="whichBlur(this.name)">
</form>
</body>
</html>

Thanks

Ads









Related Tutorials/Questions & Answers:
Advertisements
Tutorials   
Java Spring Hibernate Struts Training Ajax java How to cascade two text boxes?? How to create runtime drag and drop form builder using asp.net mvc and jquery jsp+ajax validation JQuery-JSP AJAX example not working What is Ajax Framework How to write first example in Ajax? What are Advantages and Disadvantages of AJAX What is Ajax? how to set running watch with descending order in applycation with ajax how to set running watch with descending order in applycation with ajax jsp pages for dispatchaction for adding user to database c++ new, delete, string class using ajax i want to insert data into oracle database how to generate reports from oracle database using jsp and ajax code dynamic creation of multiple drop-down menus Ajax programming tutorials Displaying data from combobox on the web page Displaying data from combobox on the web page Displaying data from combobox on the web page Displaying data from combobox on the web page Displaying data from combobox on the web page What is Java? How to make a ajax application which take data from textarea and that page is not refreshing. how can add new line character into ajax response for java how can add new line character into ajax response for java c# c# asp.net Struts 2 + Ajax bodygaurd java Ajax mew 333 data insertion and fetch 1 my answer what is an ajax call? what is an ajax call? JSF How to easily send and receive recorders from database (in AJAX)? calculating time difference for manually entered in-time and out-time in hours and min for dynamically generated rows in jsp and display in third textfield. how to operate on select box using ajax in struts2? how to operate on select box using ajax in struts2? Auto Search box using ajax Dependant Dropdown Lists AJAX REGISTRATION FORM ajax code for jsp java i want to know how a slide will hide i want to know how a slide will hide

Ads

 
Advertisement null

Ads