473,324 Members | 2,268 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

moving from form element to form element

I'm looking for a way that when a user enters the required information in a
form text box, the cursor automatically moves to the next textbox (asp.net).
Can this be done in ASP.NET or must it be done with client side javascript.
If client side, does anyone know of an example to look at?
Rod
Nov 18 '05 #1
1 1004
Hi

Client scripting issue...here is something to get you going hopefully
<form>
<input name="myInput1" onchange="doValidate(this,this.form.myInput2)">
<input name="myInput2" onchange="doValidate(this,this.form.myInput3)">
etc
</form>

function doValidate(elSrc,elFocusTo){
if(elSrc.value == "blah") elFocusTo.focus();//Pretty basic check ;-)
else
{
alert("Blah blah");
elSrc.focus();
}
}

Server:
myInput1.Attributes.Add("onchange","doValidate(thi s,this.form.myInput2)");
etc

--
Best Regards
Vidar Petursson
==============================
Microsoft Visual: Scripting MVP 2000-2004
http://www.icysoft.com/
http://www.deus-x.com/ Instant e-commerce
http://www.microsoft.com/technet/scriptcenter/
Playground: http://213.190.104.211/ ( IE 5.5+ only )

No matter where you go there you are
==============================
"Rod Snyder" <ro*@rcsnyder.com> wrote in message
news:ud**************@TK2MSFTNGP09.phx.gbl...
I'm looking for a way that when a user enters the required information in
a
form text box, the cursor automatically moves to the next textbox
(asp.net).
Can this be done in ASP.NET or must it be done with client side
javascript.
If client side, does anyone know of an example to look at?
Rod

Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: Michal Migurski | last post by:
Hi everyone, I've been planning to move to Python from PHP for some time now. I use PHP extensively for web scripting, with mod_php, Apache, and a DB (I would characterize my knowledge of PHP as...
10
by: Mark McLellan | last post by:
Dear all Following the oft-repeated advice here and ciwas I have made my site nearly 4.01 strict (working on it). There are some items on which I would appreciate your advice: 1. Hidden...
12
by: swingingming | last post by:
Hi, in the NorthWind sample database, when clicking on the next navigation button on the new order record with nothing on the subform (order details), we got an order with nothing ordered. How can...
0
by: Jeff Waskiewicz | last post by:
Here is what I am trying to accomplish. I have an MDI application on the left side of the client area I have a borderless form that holds a treeveiw for navigation. When an item is selected from...
2
by: Diogo Alves - Software Developer | last post by:
Greetings I would like to knowhow can I put a sliding panel... I've done this: if (panel1.Width < 300) { while (panel1.Width < 300) { panel1.Width = panel1.Width + 40;
5
by: niklaus | last post by:
Hi, I have an array in which elements are present . The number of elements n <= 10^6 . Now if i delete an element in the array, i want to update the array by moving all the elements to the...
1
by: madflytom | last post by:
Hello, I'm trying to move the options of one select list to another select list. The "source" select list is divided into optgroups, and the "target" select list is not. I want to somehow keep...
10
by: cjparis | last post by:
Hello everyone. If anyone can give me a hand I would be gratefull Am doing a site which requires a moving element and have used DHTML to do it. Have a simple Browser detect script to sort IE...
0
by: Peter Anthony | last post by:
It seems kind of strange that if a Form is just moved that Resize events fire. This makes it hard to tell the difference betweeen resizing and moving a Form. I can understand why resizing might...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.