473,406 Members | 2,816 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,406 software developers and data experts.

checking if a value changed in onblur event handler

Hi,

Using the onblur handler in a text field, how can I check if the value
was changed from what was originally there prior to the user focussing
on the text field?

Thanks, - Dave

Jul 13 '07 #1
7 5238
On Jul 13, 4:34 pm, "laredotorn...@zipmail.com"
<laredotorn...@zipmail.comwrote:
Hi,

Using the onblur handler in a text field, how can I check if the value
was changed from what was originally there prior to the user focussing
on the text field?

Thanks, - Dave
Store the value in the onfocus handler and check against it in onblur.

Jul 13 '07 #2
On 7 14 , 4 40 , David Mark <dmark.cins...@gmail.comwrote:
On Jul 13, 4:34 pm, "laredotorn...@zipmail.com"

<laredotorn...@zipmail.comwrote:
Hi,
Using the onblur handler in a text field, how can I check if the value
was changed from what was originally there prior to the user focussing
on the text field?
Thanks, - Dave

Store the value in the onfocus handler and check against it in onblur.
Why you use the onblur,but not use onkeydown or onchange?

Jul 14 '07 #3
On Jul 14, 6:51 am, "jidixuel...@gmail.com" <jidixuel...@gmail.com>
wrote:
On 7 14 , 4 40 , David Mark <dmark.cins...@gmail.comwrote:
On Jul 13, 4:34 pm, "laredotorn...@zipmail.com"
<laredotorn...@zipmail.comwrote:
Hi,
Using the onblur handler in a text field, how can I check if the value
was changed from what was originally there prior to the user focussing
on the text field?
Thanks, - Dave
Store the value in the onfocus handler and check against it in onblur.

Why you use the onblur,but not use onkeydown or onchange?
Because that isn't what the OP asked for. onkeydown doesn't enter
into it, but you could use onchange instead of onfocus and onblur.

Jul 14 '07 #4
On Jul 14, 5:42 pm, David Mark <dmark.cins...@gmail.comwrote:
On Jul 14, 6:51 am, "jidixuel...@gmail.com" <jidixuel...@gmail.com>
wrote:
On 7 14 , 4 40 , David Mark <dmark.cins...@gmail.comwrote:
On Jul 13, 4:34 pm, "laredotorn...@zipmail.com"
<laredotorn...@zipmail.comwrote:
Hi,
Using the onblur handler in a text field, how can I check if the value
was changed from what was originally there prior to the user focussing
on the text field?
Thanks, - Dave
Store the value in the onfocus handler and check against it in onblur.
Why you use the onblur,but not use onkeydown or onchange?

Because that isn't what the OP asked for. onkeydown doesn't enter
into it, but you could use onchange instead of onfocus and onblur.

when onchange event is invoked ?
is it invoked when the actual value of text field is
changed by user interaction (by key board/ mouse - copy paste)?
what if, the value of text field is changed by the script and not by I/
O device?

I am changing the value of text field by a java script
(asynchronous) and i want that event catched when value changed.
"onchange" does not work at that time.

Is there any way to detect the change?

Jul 18 '07 #5

<sa*********@gmail.comwrote in message
news:11**********************@o11g2000prd.googlegr oups.com...
On Jul 14, 5:42 pm, David Mark <dmark.cins...@gmail.comwrote:
>On Jul 14, 6:51 am, "jidixuel...@gmail.com" <jidixuel...@gmail.com>
wrote:
On 7 14 , 4 40 , David Mark <dmark.cins...@gmail.comwrote:
On Jul 13, 4:34 pm, "laredotorn...@zipmail.com"
<laredotorn...@zipmail.comwrote:
Hi,
Using the onblur handler in a text field, how can I check if the
value
was changed from what was originally there prior to the user
focussing
on the text field?
Thanks, - Dave
Store the value in the onfocus handler and check against it in
onblur.
Why you use the onblur,but not use onkeydown or onchange?

Because that isn't what the OP asked for. onkeydown doesn't enter
into it, but you could use onchange instead of onfocus and onblur.


when onchange event is invoked ?
is it invoked when the actual value of text field is
changed by user interaction (by key board/ mouse - copy paste)?
what if, the value of text field is changed by the script and not by I/
O device?

I am changing the value of text field by a java script
(asynchronous) and i want that event catched when value changed.
"onchange" does not work at that time.

Is there any way to detect the change?
No, but if it is your code that is doing it, why not do whatever you need to
do after setting the value.
>

Jul 18 '07 #6
On Jul 18, 7:22 pm, "David Mark" <dm...@cinsoft.netwrote:
<sandip.b...@gmail.comwrote in message

news:11**********************@o11g2000prd.googlegr oups.com...
On Jul 14, 5:42 pm, David Mark <dmark.cins...@gmail.comwrote:
On Jul 14, 6:51 am, "jidixuel...@gmail.com" <jidixuel...@gmail.com>
wrote:
On 7 14 , 4 40 , David Mark <dmark.cins...@gmail.comwrote:
On Jul 13, 4:34 pm, "laredotorn...@zipmail.com"
<laredotorn...@zipmail.comwrote:
Hi,
Using the onblur handler in a text field, how can I check if the
value
was changed from what was originally there prior to the user
focussing
on the text field?
Thanks, - Dave
Store the value in the onfocus handler and check against it in
onblur.
Why you use the onblur,but not use onkeydown or onchange?
Because that isn't what the OP asked for. onkeydown doesn't enter
into it, but you could use onchange instead of onfocus and onblur.
when onchange event is invoked ?
is it invoked when the actual value of text field is
changed by user interaction (by key board/ mouse - copy paste)?
what if, the value of text field is changed by the script and not by I/
O device?
I am changing the value of text field by a java script
(asynchronous) and i want that event catched when value changed.
"onchange" does not work at that time.
Is there any way to detect the change?

No, but if it is your code that is doing it, why not do whatever you need to
do after setting the value.
>
Hello Dave
Actually my code is not changing the value, I am using a
third party javascript
Utility(html-editor: GPL ). Which changes the value. I can't change
the utility code(GPL).
Therefore I wanted to detect that change.

Thanks.

Jul 24 '07 #7
On Jul 24, 7:07 am, sandip.b...@gmail.com wrote:
On Jul 18, 7:22 pm, "David Mark" <dm...@cinsoft.netwrote:


<sandip.b...@gmail.comwrote in message
news:11**********************@o11g2000prd.googlegr oups.com...
On Jul 14, 5:42 pm, David Mark <dmark.cins...@gmail.comwrote:
>On Jul 14, 6:51 am, "jidixuel...@gmail.com" <jidixuel...@gmail.com>
>wrote:
On 7 14 , 4 40 , David Mark <dmark.cins...@gmail.comwrote:
On Jul 13, 4:34 pm, "laredotorn...@zipmail.com"
<laredotorn...@zipmail.comwrote:
Hi,
Using the onblur handler in a text field, how can I check if the
value
was changed from what was originally there prior to the user
focussing
on the text field?
Thanks, - Dave
Store the value in the onfocus handler and check against it in
onblur.
Why you use the onblur,but not use onkeydown or onchange?
>Because that isn't what the OP asked for. onkeydown doesn't enter
>into it, but you could use onchange instead of onfocus and onblur.
when onchange event is invoked ?
is it invoked when the actual value of text field is
changed by user interaction (by key board/ mouse - copy paste)?
what if, the value of text field is changed by the script and not by I/
O device?
I am changing the value of text field by a java script
(asynchronous) and i want that event catched when value changed.
"onchange" does not work at that time.
Is there any way to detect the change?
No, but if it is your code that is doing it, why not do whatever you need to
do after setting the value.

Hello Dave
Actually my code is not changing the value, I am using a
third party javascript
Utility(html-editor: GPL ). Which changes the value. I can't change
the utility code(GPL).
Therefore I wanted to detect that change.
Unless the editor can do a callback on this change or can be
subclassed, I don't know what you can do.

Jul 24 '07 #8

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

Similar topics

2
by: Bartosz Wegrzyn | last post by:
I use onblue event to validate fields in my form. I do this onblur="return isname()" and so so ... I have one form with 20 fields. My problem is that when the focus is for example on the...
2
by: D. Alvarado | last post by:
Hi, I'm having some trouble with the "onBlur" event in the BODY tag. Ideally, what I want to happen is that when someone leaves window A, window A executes a command. I had put <body...
2
by: andyalean | last post by:
Hello javascript coders :( ,I am trying to add an onblur event to my code. This is where I dynamically create a textfield.I want to assign it an onblur event handler like so.How do I add a event...
5
by: Dave Hammond | last post by:
Hi All, I have a web form which performs certain actions upon moving focus away from a field. However, if the user clicks the top corner 'X' icon to close the window, the onBlur event still...
13
by: aundro | last post by:
Hello, I've been looking on the web for a solution to this problem: I create a set of checkboxes, and 2 buttons: - one is labeled "All" - the other is labeled "None" Clicking "All" is...
5
by: Dave | last post by:
How do I check in a Windows Forms app if any controls have changed? I have a form that collects data, and I want to prompt the user if they try to exit the app, or load a new file, without saving...
6
by: KDCinfo | last post by:
Although I'm making an ajax call, this is really a javascript question (although it could be even more of an HTML or DOM question... not exactly sure) I'm doing an ajax call to a remote php...
1
by: suresh_nsnguys | last post by:
Hi, i am displaying google.com website inside a frame with frameset setting onblur="self.focus();". but when i am trying to enter some text in google search box,the text is not getting...
2
by: wolverine | last post by:
Hi All, In Mozilla Firefox, to onblur and onfocus event of each and every html element, the browser itself will attach a native event handler. I mean if you type,...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.