• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

textfield.focus() problem

 
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have more than 2 text field in html. I want to validate first field and if its not validate and than alert shows on page. and i don't want to send control on second field. so I wrote in onchange event on this field and in this I wrote this.focus() and this.select(); but its not work. If only one field in form than this problem solved but for more than 2 field it can not solve. Please any body can help me.

Thanks
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is the magical code you are talking about that has errors?

Eric
 
Rajni Patel
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
its not error coming. But control is going on next field.

<code>
<form name="validationForm">
<table>
<tr>
<td>First Name:</td><td><input type ="text" name="firstName"></td>
</tr>
<tr>
<td>Last Name:</td><td><input type ="text" name="lastName" ></td>
</tr>
<tr>


<td>Email Id:</td><td><input type ="text" id="emailIdText" name="emailid"
onChange = " if (custInfo.validate.validation.validateEmailAddress() == false){
alert('in jsp');
this.focus();
this.select();
} "></td>
<td><div id ="emailIdValidationDiv"></div></td>


</tr>
</code>

Thanks
 
Rajni Patel
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sorry, this is the code






thanks
 
There is no "i" in denial. Tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic