Geeks Talk

Prepare for your Next Interview




Need Urgently Help

This is a discussion on Need Urgently Help within the JavaScript forums, part of the Web Development category; Hi I am javacript function in aspx page function check() { var letters = window.document.forms(0).txtItem1.value.length+1; if (letters { window.document.forms(0).txtItem1.focus() } else { window....


Go Back   Geeks Talk > Web Development > JavaScript

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 03-19-2008
Junior Member
 
Join Date: Jul 2007
Location: Mumbai
Posts: 16
Thanks: 1
Thanked 4 Times in 3 Posts
mahesh9920 is on a distinguished road
Question Need Urgently Help

Hi

I am javacript function in aspx page
function check()
{
var letters = window.document.forms(0).txtItem1.value.length+1;
if (letters <= 16)
{
window.document.forms(0).txtItem1.focus()
}
else
{
window.document.forms(0).txtItem2.focus()
}
}


I want to move focus on 24 textbox( txtItem1 to txtItem24)
can any one tell me how should i move focus on 24 Textbox.
when user eneterd maxlength in each textbox. as above.
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-24-2008
Junior Member
 
Join Date: Jun 2008
Location: India
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
asubu is on a distinguished road
Re: Need Urgently Help

What i understood from your question is, the moment user tries to enter more then the maximum allowed as per your logic the Focus should move to text24 field.

If i am correct then try with , use onkeypress="check()" in your field text1.
Reply With Quote
Reply

  Geeks Talk > Web Development > JavaScript

« Javascript | - »

Thread Tools
Display Modes


Similar Threads

Thread Thread Starter Forum Replies Last Post
SQL DBA needed urgently niruinfotech SQL 0 07-09-2007 02:22 AM


All times are GMT -4. The time now is 06:14 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Copyright © 2008 GeekInterview.com. All Rights Reserved