Flash Games
 FAQ   Search   Memberlist   Usergroups   Register  Profile   Log in to check your private messages   Log in 


js - checkbox count - print



 

Post new topic   Reply to topic  
   DEVPPL Forum Index -> JavaScript Forum
View previous topic :: View next topic  
Author Message
wtfn00b



Joined: 28 Jun 2008
Posts: 1

PostPosted: Sat Jun 28, 2008 11:15 am    Post subject: js - checkbox count - print Reply with quote

Hellow, I want to make function with js,
with who I can count checboxes witch is checked,
page countaines only checboxes and text.
Every text entry is with it's ID where is one checkbox belove it.
I have about 20 checkboxes and
I want to do thing like this - check 2 or 3 whatever how much checkboxes and send by ID to print.php?=$id page.
And the text I get from datebase what's why I need ID.

Got smth like this by it's wrong:

function checkbox(form)
{
var url = "print.php";
var all = 0;
var max = form.checkbox.length;
for (var idx = 0; idx < max; idx++)
{
if (eval("document.form[" + idx + "].checked") == true)
{
visi += 1;
}
}
alert("checked" + all ");
}
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    DEVPPL Forum Index -> JavaScript Forum All times are GMT + 1 Hour
Page 1 of 1

 
 
Welcome to DEVPPL.com
You are not logged in, which means that you can't post in the forums.
Click here to Register

If you are a current member here on DEVPPL, please login below:

User: Pass:
Log me on automatically each visit:

 


Powered by phpBB © 2001, 2005 phpBB Group - Modified by DEVPPL

Flash Games - Sitemap