/    Sign up×
Community /Pin to ProfileBookmark

checking checkbox array values

Hi All,

I have only single checkbox(array) inside a form.This checkbox is moving under a loop.so it should be del[0]–>32,del[1]–>56…..and so on.

I want to check the values wether they are coming or not.
Here is my code:

<form>
<input type=”checkbox” name=”del[]” value=”<?=$pid;?>”>
</form>

if the value is empty then i want to throw a alert to select the check boxes first.But here the values are coming in an array.Thats the problem.

I just need to check the array values using a javascript funtion.

Please guide me.Thanks in advance for your co-operation..

Luv……..Raj

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @raj_2006 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...