Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / JScript / January 2004

Tip: Looking for answers? Try searching our database.

validated in the Blur Event

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
shreekannan - 20 Jan 2004 07:16 GMT
Hai Techies,
   Greetings!!!
   I have a situation where the user entry in a text box control has to be validated in the Blur Event. If the user entry is invalid the cursor control has to be set in the same control(i.e., setting focus to the same control). For this i have written a client-side JavaScript code (given below). The code works fine in Internet Explore but fails with Netscape7.0 browser.
   Can anyone help me to get rid of this failure in Netscape?

<HTML>
<HEAD>
 <META NAME="GENERATOR" Content="Microsoft Visual Studio 7.0">
 <TITLE></TITLE>
 <script language="javascript">
   function txtValidation()
   {
      if (document.form1.txtNum.value == "")
       {
           alert( 'Please enter a value');
           document.form1.txtNum.focus();
       }    
   }
 </script>
</HEAD>
<BODY>
 <form id="form1" name="form1">
  <input type="text" id="txtNum" name="txtNum" onblur="txtValidation();" /> <input type="submit" ID="Submit1" NAME="Submit1" />
 </form>
</BODY>
</HTML>
   
   Your help is greatly appreciated.

With Rega rds,
Kannan

---
Posted from .NET's Largest Community Website: http://www.dotnetjunkies.com/newsgroups/
bruce barker - 20 Jan 2004 17:27 GMT
i see nothing wrong, and a quick test with netscape shows it works

> Hai Techies,
>     Greetings!!!
>     I have a situation where the user entry in a text box control has to be validated in the Blur Event. If the user entry is invalid the cursor
control has to be set in the same control(i.e., setting focus to the same
control). For this i have written a client-side JavaScript code (given
below). The code works fine in Internet Explore but fails with Netscape7.0
browser.
>     Can anyone help me to get rid of this failure in Netscape?
>
[quoted text clipped - 27 lines]
> ---
>  Posted from .NET's Largest Community Website: http://www.dotnetjunkies.com/newsgroups/

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.