Thanks alot for your guidance. It really worked.
On Feb 25, 5:07 pm, RobG wrote:
> On Feb 25, 6:55 pm, Bluesapphire wrote:
>
> > Hi!
> > How can i check that atleast one option is selected in multiselect
> > listbox. How can this be done through JQUERY.
>
> I guess you want to see if at lea
On Feb 25, 6:55 pm, Bluesapphire wrote:
> Hi!
> How can i check that atleast one option is selected in multiselect
> listbox. How can this be done through JQUERY.
I guess you want to see if at least one option in a multiple select
element is selected. Look at its selectedIndex attribute.
cked') : alert('none checked');
});
});
Checked?
Maurício
-Mensagem Original-
De: "Frederik Ring"
Para: "jQuery (English)"
Enviada em: quarta-feira, 25 de fevereiro de 2009 08:27
Assunto: [jQuery] Re: Multiselect listbox
The thing is you will not se
The thing is you will not select a named element by $('.name') but an
element of the class "name".
How does your HTML look like?
On Feb 25, 12:14 pm, Bluesapphire wrote:
> Hi!
> Thanks for guidance. I have changed JS code as follows. And now it
> is totally ignoring the check.
>
> My listbox
Hi!
Thanks for guidance. I have changed JS code as follows. And now it
is totally ignoring the check.
My listbox name is "zonelocation[]" . I have used name with/without
DOT in JQUERY identifier placeholder. The result is same.
/*/
var zonelocationVal;
jQue
Also remove the else-part of the attribute checking, this way it'll
only return true if the last element is checked.
On Feb 25, 11:41 am, Frederik Ring wrote:
> 2 things: you are referring to multiple checkboxes, but do that with
> an ID (#zonelocation). That will not work. Use a class instead.
2 things: you are referring to multiple checkboxes, but do that with
an ID (#zonelocation). That will not work. Use a class instead.
Second: Depending on the type of your checkboxes and your DOCTYPE you
might need to change the attr('checked') == 'checked' according to
your needs. I only used thi
Thanks for guidance.
My JS code is as follows:
//
var zonelocationVal;
jQuery('#zonelocation').each(function(){
if(jQuery('#zonelocation').attr('checked') == 'checked'){
zonelocationVal = true;
}
You could do sth like:
var ok = false;
$('.elementInListbox').each(function(){
if ($(this).attr('checked') == checked){ok = true);}
});
You will have to set your attributes according to the type of your
elements though.
On Feb 25, 9:55 am, Bluesapphire wrote:
> Hi!
> How can i check that
9 matches
Mail list logo