User not logged in - login - register
Home Calendar Books School Tool Photo Gallery Message Boards Users Statistics Advertise Site Info
go to bottom | |
 Message Boards » » limit the number of checkboxes a user can select? Page [1]  
drtaylor
All American
1969 Posts
user info
edit post

so here's the thing - google maps crashes browsers on slower machines when you try and map too many locations at once. we're allowing users to select real estate listings to map by providing a checkbox beside each of the listings that show up through their search. they can display up to 99 listings on a page and i just know somebody is going to sit there and click all of them (because i haven't let them have a "map all" function).

is there any way for me to have all the checkboxes become inactive after the user selects, say, 20 items?

8/26/2005 1:42:12 PM

OmarBadu
zidik
25071 Posts
user info
edit post

a better solution would be to allow them to check as many as they want and then only show them 20 - with a next button for the others

8/26/2005 1:43:25 PM

drtaylor
All American
1969 Posts
user info
edit post

that's not a bad strategy - any other alternative ideas

8/26/2005 1:44:56 PM

darkone
(\/) (;,,,;) (\/)
11610 Posts
user info
edit post

Just let it crash and laugh at them. Just put a little disclaimer by the submit button.

8/26/2005 1:49:59 PM

ZeroDegrez
All American
3897 Posts
user info
edit post

Yes, you 'can' disable them but, javascript is a bitch when dealing with various browsers.

Why are we giving ideas to google?

Just run a counter, when the clicked event happens ++ it, when it hits 20, prevent the checkmark from happening. I believe you can do that by just returning false from the clicked event. I may be wrong. When they click a clicked one, -- the counter, and you're good to go. And show them in a lable the number of items they have left they can check.

8/26/2005 2:19:53 PM

Shaggy
All American
17820 Posts
user info
edit post

Quote :
"Yes, you 'can' disable them but, javascript is a bitch when dealing with various browsers."


just make sure it works in IE. Anything else doesn't really matter.

8/26/2005 2:25:47 PM

ZeroDegrez
All American
3897 Posts
user info
edit post

uh...Firefox?

8/26/2005 2:28:15 PM

Shaggy
All American
17820 Posts
user info
edit post

Quote :
" doesn't really matter."

8/26/2005 2:29:32 PM

Incognegro
Suspended
4172 Posts
user info
edit post

to do it properly you should probably use JavaScript if it's detected as enabled, and dirty, slow postback if not (probably mentioning in a big red warning box that it's using postback because they have javascript disabled)

8/26/2005 2:31:28 PM

Stein
All American
19842 Posts
user info
edit post

If they're using Google Maps, they're going to have to have JavaScript on anyway.

8/26/2005 2:50:53 PM

drtaylor
All American
1969 Posts
user info
edit post

Quote :
"uh...Firefox?"


well we all use it, but only 1% of the visitors to our site do

Quote :
"If they're using Google Maps, they're going to have to have JavaScript on anyway."


yeah they do, matter of fact it's all the java that winds up crashing it

thanks for the input guys. right now i'm thinking that the "let them crash it" is the right approach to take

8/26/2005 7:39:47 PM

 Message Boards » Tech Talk » limit the number of checkboxes a user can select? Page [1]  
go to top | |
Admin Options : move topic | lock topic

© 2024 by The Wolf Web - All Rights Reserved.
The material located at this site is not endorsed, sponsored or provided by or on behalf of North Carolina State University.
Powered by CrazyWeb v2.39 - our disclaimer.