C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Code Snippets » Javascript »

give focus to a text by javascript


Posted Date: 15 Dec 2008    Resource Type: Code Snippets    Category: Javascript
Author: Arun Krishnan C.P Member Level: Gold    
Rating: 1 out of 5Points: 10



***
This code use javascript to give focus to a text
***

< html >
< script language="javascrip" >
function click(){
document.getElementById("textname").focus();
alert('text focused');
< /script >

< body >
< form name="formone" method="get" >
< input type="text" name="textname" onclick="click()" > // If you click form will submitted and text will get focus;
< /form >
< /body >




Responses

Author: Miss Meetu Choudhary    10 Apr 2009Member Level: Diamond   Points : 2
for formatting

Please Post Your Resources fully formatted it saves lots of time while editing use & lt instead of "<" and & gt instead of ">" so that your code will appear as you want other wise it will be interpreted as HTML Tags as they are allowed in the resources... and use code /code in the big brackets as special tag to display the code snippets...

Thanks and Regards
Meetu Choudhary
Editor



Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
Text  .  Script  .  Focus  .  

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: submit page using java script
Previous Resource: Return length of a String
Return to Discussion Resource Index
Post New Resource
Category: Javascript


Post resources and earn money!
 
More Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use