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

Detecting a change on a hidden field

Claus Mygind
571 512MB
How do you get a trigger/event to fire on a hidden field. In this case I have a hidden field that is updated via a script. It seems when a field is updated in this manner none of the event triggers like "onChange" "onSelect" "onBlur" will fire.

Is there some script based way this can occur?

Currently I add code to every method I use to update a field from script. But I have a number on methods that does this, and I do not wish to go into each of them and add code that the field has been changed. I am looking for some way for the field to detect that something changed.
Mar 25 '08 #1
2 3397
hsriat
1,654 Expert 1GB
How do you get a trigger/event to fire on a hidden field. In this case I have a hidden field that is updated via a script. It seems when a field is updated in this manner none of the event triggers like "onChange" "onSelect" "onBlur" will fire.

Is there some script based way this can occur?

Currently I add code to every method I use to update a field from script. But I have a number on methods that does this, and I do not wish to go into each of them and add code that the field has been changed. I am looking for some way for the field to detect that something changed.
I think you might be changing the hidden input's value with JavaScript, as its not possible otherwise.

So just after you change the value of the field, in the next line, execute the code which you want to execute onchange.
Mar 25 '08 #2
Claus Mygind
571 512MB
I think you might be changing the hidden input's value with JavaScript, as its not possible otherwise.

So just after you change the value of the field, in the next line, execute the code which you want to execute onchange.
You are correct. I am changing value via scripts (note plural). I did not want to have to change every script that updates the value of the field. I wanted the field to detect the change and fire the event, the same as if the user had made the change.

I have an add/edit/delete screen. On it I have several methods for the user to fill the form elements i.e. they can type in the field, they can use one of my search methods which open sub-windows for lookup purposes where they can select a record which is then backfilled on the calling screen via script. I am now adding ajax communication which goes out to look for the next 30 records which can be used by the user for browsing. So as you see there are a number of ways to fill the field. But only the user input (typing in the field) will trigger the onChange. And of course on my previous search methods I use script to mark the change. I was just hoping for a single point to capture any change that occurred regardless of the method of change.

Is that possible?
Mar 25 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

25
by: Ryan Stewart | last post by:
I'm working on a project to collect web application usage statistics. What are the recommended ways of detecting whether a browser is JavaScript enabled and/or capable? Obviously I can write a...
2
by: Simon Harvey | last post by:
Hi all, Is there any easy way to check a field for calues that have changed on a post back. So the page is sent to the user, the user changes some values and I need to know which ones...
7
by: Simon Harvey | last post by:
Hi everyone, I'm having a frustrating problem and I don't know how to fix it without totally redoing a very complicated couple of pages on my site. I really hope some kind soul can help me :-) ...
6
by: K Viltersten | last post by:
I have the following button: <asp:LinkButton id="Btn" runat="server" text="Click"> </asp:LinkButton> I have added an action listener in the javascript where I change the text on it:...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.