Thanks waseem...you've put me on the right track!
On May 11, 12:23 pm, waseem sabjee wrote:
> actually it might work
>
> var obj = $("#mdiv select");
>
> for(var i=0; i < obj.length; i++) {
> obj.eq(i)
>
> }
>
> // the above method will get alll tags within a tag and loop
> then
>
> if y
actually it might work
var obj = $("#mdiv select");
for(var i=0; i < obj.length; i++) {
obj.eq(i)
}
// the above method will get alll tags within a tag and loop
then
if you want to loop the options within them you can either make obj to be
$("#mydiv select option");
or you can run a lo
@Mike: Yeah that won't work. Most of the values aren't unique.
On May 11, 11:43 am, Mean Mike wrote:
> wouldn't it make more sense to just have one drop down menu with all
> school choices in it ? as long as all the schools differ in value I
> pretty sure that would make your life easier
>
>
wouldn't it make more sense to just have one drop down menu with all
school choices in it ? as long as all the schools differ in value I
pretty sure that would make your life easier
On May 11, 1:41 pm, Loony2nz wrote:
> I had a better thought.
>
> How do I get the count of options within a div?
I had a better thought.
How do I get the count of options within a div?
I can then loop thru the select options and see if any of them are
value "0".
Is this possible?
On May 11, 10:09 am, waseem sabjee wrote:
> i suggest for this line
> Select something
> you assign the value of "0"
>
> in
i suggest for this line
Select something
you assign the value of "0"
in order to retrieve this value use the following js
$(function() {
$("select").click(function() {
var value = $(this).val();
if(val != 0) {
// do what you need to do
} else {
alert("you have not selected an option");
}
});
6 matches
Mail list logo