Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: Check if onchange is made by hand


Message #1 by "Marco van Schaijk" <Marco.vanSchaijk@e...> on Thu, 23 Nov 2000 10:08:27 -0000
This is a multi-part message in MIME format.

------=_NextPart_000_031E_01C05868.94966060
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

hi,

onChange is called only when you have changed some values of that text 
box. this means that your focus is there on that text box.

you can check that user has moved away from that box by setting a 
document level variable and setting it with events onFocus and onBlur of 
that text box.

jigs
jigs
  ----- Original Message -----
  From: Marco van Schaijk
  To: javascript
  Sent: Friday, November 24, 2000 1:56 AM
  Subject: [javascript] Check if <INPUT> onchange is made by hand


  Hello,

  I have the following problem.
  On a HTML page I have 2 INPUT fields: INPUT1 and INPUT2
  Both fields can be filled by JavaScript on the same page.
  INPUT1 can be changed by the user.
  If the user changes INPUT1, INPUT2 must be cleared.
  My question:
  How can I see the difference between the change of INPUT1 made by
  JavaScript and the change of INPUT1 made by the user?

  Is it possible to check if the field has focus when I check the 
OnChange
  of INPUT1?
  Is there any other way?

  ( I Agree that this is no ASP but Client Side Scripting, but there is
  (YET) no client side scripting list. Therefor I try this list)

  Regards,
  Marco van Schaijk
  EDS Netherlands

  ---
  NEED TECHNICAL TIPS, TOOLS, AND INSIGHTS?  Is FREE okay?
  Visit EarthWeb for the latest in IT Management, Software Development,
  Web Development, Networking & Communications, and Hardware & Systems.  

  Click on http://www.earthweb.com for FREE articles, tutorials,
  and discussions from the experts.
$subst('Email.Unsub')





  Return to Index