3 2282
joe t. wrote:
[snip] However, using IE6, the visual does not refresh unless the user clicks away from the control element (eg. open area of page, or clicking one of the still-dimmed elements that should be available).
In the HTML specification, and the DOM 2 Events specification, the
change event is defined in terms of control focus and value change,
not just the latter. Microsoft's interpretation could be deemed the
most correct, but hardly the most useful in terms of checkbox usage.
You can use the click event instead, though it does have problems in
at least one browser (though I think that was NN4, so not too much to
worry about).
Is there a flaw in my code, [...]
There is one: you shouldn't disable elements via HTML. If it's
possible for a user to arrive at your form without client-side
scripting support (a possibility on the Web), the form will be useless.
[snip]
Mike
--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
It was indeed the event handler. onClick fixed it in IE and preserved
functionality in FF. Thanks for the tip. Can't really remember why i
went with the change handler in the first place... :-?
Also, i realize initializing form elements in a specified status isn't
good practice, but this is a strictly internal page that my boss wants
me to "dummy-proof" as much as i can. So i figure if the user can't
enter random data unless deliberately choosing to do so, that's
helpful. Can't win all battles, but it might prevent some.
-joe t.
joe t. wrote: [...] Can't really remember why i went with the change handler in the first place... :-?
In principle, events like change are preferred as they don't imply any
device dependancy. However, click tends to be a synonym for activate
in most user agents.
Also, i realize initializing form elements in a specified status isn't good practice, but this is a strictly internal page [...]
With internal stuff, you can get away with much more. However, that
only holds true if you know precisely what's being used, and how it is
set up.
Mike
--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Bob Bedford |
last post by:
I've this code:
function checkdate(FormSubmit){
alert(document.getElementById('Mois').value);
if(eval(document.getElementById('Mois'))>0 &&
eval(document.getElementById('Annee'))>0){...
|
by: Jürgen Heyn |
last post by:
Good morning,
on form 2 input elements and 1 image are placed. The 1st (Index) one is
"hidden", the 2nd ) is an empty textbox.
When clicking the picture I would like to toogle a boolean value....
|
by: Shabam |
last post by:
Is there a way to present a form to a user by default with all forms
disabled, then when user clicks a link, the fields become enabled?
|
by: Mel |
last post by:
i want to diable all submit_buttons untill all my form elements are
populated.
how can i do that ?
thanks
|
by: Ben |
last post by:
Here's what I have se far:
<script type="text/javascript">
other_text.disabled = true;
function other_text() {
other_text.disabled = (other_check.checked == false)? false :
true;
}
</script>...
|
by: hortoristic |
last post by:
We are using JavaScript to Enable/Disable certain fields on web pages
based on business rules.
A simple example is if when using an option type tag, and the two
options are Yes and No. If YES...
|
by: DBQueen |
last post by:
I have a form with lines of controls. On some of the lines there are 3
controls (call them A,B,C); other lines have only control A. The controls
have been numbered sequentially (Q20, Q21....Q76)...
|
by: John |
last post by:
Hi
How can I create a toggle button on a toolbar that would enable/disable
editing on the current form?
Thanks
Regards
|
by: Neil Coleclough |
last post by:
I am constructing a database to process product returns for my Company.
I have a number of toggle buttons to identify the stage to which each
return has been processed. For example, clicking the...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
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
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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...
|
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,...
|
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...
|
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...
|
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,...
| |