Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
|
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 24th, 2004, 04:44 AM
Authorized User
 
Join Date: Feb 2004
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
Default How do I simulate a circular tab control set?

Hello,
Suppose I have the following form:

<form>
Val1:<input type=text tabindex=1 name="val1"><br>
Val1:<input type=text tabindex=2 name="val2"><br>
<input type=submit tabindex=3 name="Submit">
<input type=reset tabindex=4 name="Delete">
</form>

If I use the tabulator once I am on the "Delete" button, I want to be back on field one again (val1).... How do I do it?
With the above code, I start with field 1 but after field 4, I go anywhere in the web page!!!.

An idea could be to setFocus on the val1 field when I exit from <Delete> button.... I have tried:

<input onClick=delete() onExit=focus() tabindex=4 name="Delete">
(where the delete function reset the fields and the focus function focuses on field 1) ..... but it does not work.

Thanks for helping me out

Thanks
Elisabeth



 
Old May 24th, 2004, 08:14 AM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 683
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Elisabeth,

This should do the trick.

<input type=reset tabindex=4 name="Delete" onblur="this.form.elements[0].focus();">

Cheers,

Chris






Similar Threads
Thread Thread Starter Forum Replies Last Post
How to disable a tab on a tab control. dbradley VB.NET 6 April 14th, 2011 10:04 AM
Calendar Control with Tab Control Slicemahn Access 1 June 12th, 2006 10:35 PM
tab control.. gbianchi ASP.NET 1.0 and 1.1 Basics 0 April 5th, 2006 09:12 AM
Tab Control Louisa VB.NET 2002/2003 Basics 4 September 26th, 2005 09:43 AM
How to Set TAB width in RichText? myjpa General .NET 0 September 7th, 2004 09:43 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.