Project Detail

Javascript tweak  

Javascript tweak is project number 381262
posted at Freelancer.com. Click here to post your own project.

 

| More Free Trial For New Buyers
 

Status:

Selected Providers: bsvTag

Budget: $30-250

Created: 02/05/2009 at 3:19 EST

Bid Count: 25

Average Bid:
$ 31

02/08/2009 at 3:19 EST

Project Creator: ojoonline
Employer Rating: 10/1010/1010/1010/1010/1010/1010/1010/1010/1010/10 (5 reviews)

Bid On This Project
 

Description

Hi,

I have two javascript scripts that work perfectly independently but now I am trying to add them to the same form.

Function 1: Limits the number of checkboxes that can be selected to 8 (example only). An alert says when the user tries to go over the limit.

Function 2: A 'Select all' checkbox that selects all in the group. But when the selected group has more than 8 an error is called.

This is what I have so far:

<script type="text/javascript" language="javascript">

function enough(limit, validate) {
var el, msg = '', howmany = 0;
for (var i=0; i<document.forms[0].elements.length; ++i) {
el = document.forms[0].elements[i];
if (el.type == 'checkbox' && el.checked) ++howmany;
}
msg +=
(howmany>limit) ?
'Maximum of ' + limit + ' contacts can be selected. Please use lists to send to more.' :
'';
if (msg) {
alert(msg);
return false;
}
return true;
}

</script>

<script>
function toggle(theDiv) {
var elem = document.getElementById(theDiv);
elem.style.display = (elem.style.display == "none")?"":"none";
}

function CkAllNone(obj,id){
var tbs=document.getElementById(id).getElementsByTagName('INPUT');
for (var zxc0=0;zxc0<tbs.length;zxc0++){
tbs[zxc0].checked=obj.checked;
}
}
//-->
</script>


</head>
<body>
<form action="sendmessage.htm" method="post" id="sendform" name="sendform" onSubmit="return enough(8, true)">
<input type="checkbox" name="ABID" onclick="return enough(8)">1<br>
<input type="checkbox" name="ABID" onClick="return enough(8)">2<br>
<input type="checkbox" name="ABID" onClick="return enough(8)">3<br>
<input type="checkbox" name="ABID" onClick="return enough(8)">4<br>
<input type="checkbox" name="ABID" onClick="return enough(8)">5<br>
<input type="checkbox" name="ABID" onClick="return enough(8)">6<br>
<input type="checkbox" name="ABID" onClick="return enough(8)">7<br>
<input type="checkbox" name="ABID" onClick="return enough(8)">8<br>
<input type="checkbox" name="ABID" onClick="return enough(8)">9<br>
<input type="checkbox" name="ABID" onClick="return enough(8)">10<br>
<input type="checkbox" name="selectAll" value="checkbox" onClick="CkAllNone(this,'sendform');" > Select all
<br><br>
<input type="submit">
</form>

Job Type

Messages Posted:1 View project clarification board Post message on project clarification board

Bid On This Project
 

If you are the project creator or one of the bidders Log In for more options

 

33

3 days

02-06-2009 13:45 EST

Hi, I think I can do it:-)! Best regards, netcoder:-)

help

 

30

0 days

02-06-2009 14:08 EST

Check PM for more info..

help

 

30

0 days

02-05-2009 03:45 EST

let's fix it!

help

 

30

0 days

02-05-2009 11:59 EST

Hello. Please check your PM. Thanks.

help

 

30

1 day

02-06-2009 22:43 EST

i'm javascript coder.can do it in a hour.any questions plz feel free to ask.lets start.thanks

help

 

30

0 days

02-06-2009 13:30 EST

can fix with in a day.

help

 

30

0 days

02-05-2009 03:28 EST

Dear sir, Please let me help you. Thanks, Alex

help

 

30

0 days

02-06-2009 21:16 EST

I have done this.Please see PM.

help

 

30

1 day

02-05-2009 03:52 EST

please check the PM, thanks

help

 

30

1 day

02-05-2009 06:27 EST

Can start right now Thanks!

help

 

30

0 days

02-05-2009 10:16 EST

hi! ready to help!

help

 

30

0 days

02-05-2009 05:12 EST

Done! Please see PMB

help

 

30

0 days

02-05-2009 09:20 EST

Hello! Please check your PM

help

 

30

0 days

02-06-2009 13:01 EST

(No Feedback Yet)

Please see my message for your solution.

help

 

30

0 days

02-05-2009 03:28 EST

(No Feedback Yet)

I can do this work. Thanks, Suresh

help

 

30

0 days

02-05-2009 06:33 EST

(No Feedback Yet)

Hello. Let me help you. Thnx.

help

 

30

0 days

02-05-2009 08:13 EST

(No Feedback Yet)

i can work for you

help

 

30

0 days

02-05-2009 13:16 EST

(No Feedback Yet)

Hi, already done, ready to give you the solution.

help

 

50

1 day

02-06-2009 13:20 EST

(No Feedback Yet)

Check my profile

help

 

30

0 days

02-06-2009 14:08 EST

(No Feedback Yet)

I am an qualified JavaScript expert.I shall do it for you in max of 3 hrs.

help

 

35

0 days

02-06-2009 15:42 EST

(No Feedback Yet)

I have already done this before. Please go ahead and process the bid. Thank you.

help

 

30

1 day

02-06-2009 17:57 EST

(No Feedback Yet)

Good experience with development reusable JS component from more than 10 years and used AJAX many years before it was well known. if selected to solve your problem, will package it in a way to be reusable with a clear and simple API.

help

 

30

3 days

02-06-2009 21:50 EST

(No Feedback Yet)

Will be done as required.

help

 

30

1 day

02-07-2009 11:52 EST

(No Feedback Yet)

I can do this..

help

 

30

0 days

02-07-2009 15:02 EST

(No Feedback Yet)

Greetings...I am a software developer from Holland. I assure you to give the life time support of this script.

help


    Bid on this Project