HomeTuesday, May 23, 2017, 20:30:57
4

How to check checkbox checked

Wednesday, February 18, 15, 17:43:45, 2 Yaers Ago Via cilipe, Hits: 2470
Checking if checkbox is checked with jQuery
Code:
<form>
<input type="checkbox" name="mycheckbox" id="fieldid" value="1" /> One<br>
<input type="submit" id="query" name="query" value="query" />
</form>
<div id="echo"></div>

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script>
$("form").submit(function(event) {
if($('#fieldid:checked').size() == '') {
$("#echo").text("Not Checked" ).show();
event.preventDefault();
return false;
}
$("#echo").text("Checked!").show();
return;
});
</script>

Sign In

Sponsor

Related

PHP imagecreate

imagecreate() returns an image identifier representing a blank image of specified size.

PHP Mail

Sends an email.

Convert pdf to image - mpdf

Convert pdf file to jpg with php and mpdf

Email Link

HTML email link example

Password Protect With PHP

Password protect tith PHP - tutorial

MySQL Tutorials

MySQL tutorials, MySQL training, learn MySQL, MySQL Tutorial with practical examples.

Creating a CAPTCHA with PHP with imagecreate

This tutorial will show you how to create a form with Captcha, Requirement(s): PHP Server, GD Graphics Library

Contact Us PHP Form 1.1.

A contact us form with email and form field validation. It allows your visitors to send you an email directly from your website.

PHP Forms

FREE PHP forms

PHP str_replace

str_replace - This function returns a string or an array with all occurrences of search in subject replaced with the given replace value
About Author

wain

Date Registered: Sun, Feb 8, 15
Last Time Online: Sat, May 13, 17
So far has created 115 entries.
wain
This author has not yet filled in any details.