Set focus in next control on enter in PHP,ASP.NET,JSP,SERVLETS.
Download latest jQuery and apply listed below code in your web page.
<script language="javascript" src="../js/jquery-1.6.js" type="text/javascript"></script>
<input type="text" name="t1" id="t1" onkeyup="javascript: if(setFocusNext(event)) $('#t2').focus();" />
<br/>
<input type="text" name="t2" id="t2" onkeyup="javascript: if(setFocusNext(event)) $('#t3').focus();" />
<br/>
<input type="text" name="t3" id="t3" />
<script type="text/javascript">
function setFocusNext(e){
var cd=0;
if(window.event) {
cd = e.keyCode;
} else if(e.which) {
cd = e.which;
}
if(cd==13) {
return true;
} else {
return false;
}
}
</script>
Find interesting stuff in Java, PHP and Dot Net.
Stop writing good code; Start writing Innovative code.
This site is from FUTURE. Science is powerful, but it cannot explain everything.
This site is for smart Primates & ROBOTS only (oh and A L I E N S).
Pages
- Home
- Send problem from my FaceBook Page
- Your FB bio/friends
- Auto Resume Broken File Uploader
- Screen Recorder
- Facebook App
- Screencast with Audio Capture
- Web Page Screen Capture As Image
- Add Watermark In Video
- Unique Code
- PDF Merger
- Unique Software
- Latest Posts
- Arbitrary Text in PDF
- MY ANDROID APP
- Torch in Android
Search This Blog
Top Ads
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment