when I test that code, ItemTotal always returns zero (Firefox on PC).
"Stephen
Moretti To: [EMAIL PROTECTED]
(cfmaster)" cc:
<[EMAIL PROTECTED] Subject: Re: [ cf-dev ] OT : Mac OS
9 - IE 5.0 - Javascript issues.
ter.co.uk>
28/06/2004
14:27
Please respond
to dev
Stephen Moretti (cfmaster) wrote:
> Is anyone aware of any issues with IE 5 on Mac OS 9 not having enough
> finger to be able to count from 1 to 5 correctly?
Sorry.... I should be a bit more explicit. Just a p'd off with macs and
the amount of f'ing around I'm having to do for something that is
relatively simple.
I have a number of checkboxes on a page and I have a bit of code that
counts the number of boxes that have been checked onChange(). If the
number of checked boxes is greater than the maximum number of items,
then the user gets told so and the box gets unchecked. Works great on
the PC, but I've just had the project manager on the phone saying it
doesn't work on his computer (Mac OS 9: IE5.0) until he hits the
maxitem+2 item. Then it unchecks the box for maxitem+1!!!!
Any seen anything like this??
The code is at the bottom of the page, just in case I've stuffed
something up in there.
Must think calming thoughts....
calm tranquil waters, sunny beaches, margarita's in the sunshine,
funjunkie summer burn cds...
Regards
Stephen
<input type="checkbox" name="selecta5samples" value="F5164-45" class
="descriptionText" onChange
="LimitReached(document.requestinfo,this,'selecta5samples')">
var maxItems = 5;
function ItemTotal(thisForm, thisFieldName)
{
var total = 0;
var thisField = eval("thisForm."+thisFieldName);
for (var i=0;i<thisField.length;i++)
if (thisField[i].checked)
total++;
return total;
}
function LimitReached(thisForm,thisField,thisFieldName)
{
var total = ItemTotal(thisForm,thisFieldName);
if ((total > maxItems) && thisField.checked)
{
alert("You can select up to " + maxItems + " items.
Uncheck another item and try again.");
thisField.checked = false;
total--;
}
}
--
These lists are syncronised with the CFDeveloper forum at
http://forum.cfdeveloper.co.uk/
Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
CFDeveloper Sponsors and contributors:-
*Hosting and support provided by CFMXhosting.co.uk* :: *ActivePDF provided
by activepdf.com*
*Forums provided by fusetalk.com* :: *ProWorkFlow provided by
proworkflow.com*
*Tutorials provided by helmguru.com* :: *Lists hosted by
gradwell.com*
To unsubscribe, e-mail: [EMAIL PROTECTED]
--
These lists are syncronised with the CFDeveloper forum at
http://forum.cfdeveloper.co.uk/
Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
CFDeveloper Sponsors and contributors:-
*Hosting and support provided by CFMXhosting.co.uk* :: *ActivePDF provided by
activepdf.com*
*Forums provided by fusetalk.com* :: *ProWorkFlow provided by proworkflow.com*
*Tutorials provided by helmguru.com* :: *Lists hosted by gradwell.com*
To unsubscribe, e-mail: [EMAIL PROTECTED]