473,320 Members | 1,950 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,320 software developers and data experts.

OnChange & Hidden form element

Is there any way you can trigger a function when the
value of a hidden form element is changed?

thnx,
Christoph
Jul 23 '05 #1
2 15599
Christoph wrote:
Is there any way you can trigger a function when the
value of a hidden form element is changed?


Events are only triggered by users. There is no way for a user to change the
content of a hidden field. Only a script can do this. Have that script fire
off whatever other functions you want.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 23 '05 #2
Christoph wrote:
Is there any way you can trigger a function when the
value of a hidden form element is changed?

thnx,
Christoph


The only way that seems to work is via the onpropertychange event
handler:

<input type="hidden".....onpropertychange="alert('changed ')" />

....which is IE-only afaik. The entire concept of a 'change' event for a
hidden field is a bit shaky, as a change equals a value change followed
by a blur - and blur/focus for hidden fields is a seemingly invalid
concept. Since you can only change hidden fields programmatically
(script), presumably as the programmer you'd already know when you (as
opposed to a user) had changed the value...

Jul 23 '05 #3

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

Similar topics

1
by: Covad | last post by:
Hi all, For some reason my change() function is only called when the page loads. I'd much rather it gets called when the select changes. Here's the code: window.onload = init; function...
3
by: Lee Mundie | last post by:
Hi there, Simple problem here but can't seem to fix it! Okay, I have a select list from which people choose avatars... the list is option values ie. <option>Worm</option> ...
5
by: Good Man | last post by:
Hi there I'm adding form fields on the fly with some javascript DOM programming. I basically just clone a hidden <div>, then adjust node properties to make this new <div> have unique values...
2
by: a10392 | last post by:
Hi, I'am triyng to create a form where i have 2 comboBox and 2 textbox, when the selection changes on the first combo , the content of second also changes. i have to use onchange=form.submit() ...
1
by: Jan Doggen | last post by:
Hello all, I have a SELECT like this (the 'alert()s are temporary): <FORM method="POST" action="/scripts/runisa.dll?OVB2.132964:PGSPLITVACAFMELDEN:1095144287.9159" id="hulpform"...
6
by: Daz | last post by:
Hi everyone. Firstly, I apologise if this i not what you would call a PHP problem. I get quite confused as to what lives in which realm, so if this shouldn't be posted here, please suggest where...
14
by: The Natural Philosopher | last post by:
This is a nasty one and I can't see my way out of it. I have a bunch of select statements in a form, and each select statement has an onchange="do_something(this)" in it, and this works...
1
by: littlealex | last post by:
IE6 not displaying text correctly - IE 7 & Firefox 3 are fine! Need some help with this as fairly new to CSS! In IE6 the text for the following page doesn't display properly - rather than being...
15
by: colyn7 | last post by:
I really can't see what's wrong in my code... the submit() onChange doesn't work.. I've tried.. <select name="ddlTestCenter" id="ddlTestCenter" style="width:180px"...
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: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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: 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
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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.