HomeMonday, June 26, 2017, 10:24:19
4

How to check checkbox checked

Wednesday, February 18, 15, 17:43:45, 2 Yaers Ago Via cilipe, Hits: 2662
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

Advanced Contact Form - PHP Script

Advanced Contact Form with email and form field validation. Features: HTML Output(Response), Captcha Image.

Addslashes - Stripslashes

addslashes — quote string with slashes, stripslashes — un-quotes a quoted string

Imageline

Draws a line between the two given points.

PHP Fwrite : fwrite

php write to file - how to write data to a file using the php frwite function

ShoutBox 1.1. PHP Script

ShoutBox allows your users to post short messages on your site. The script is lightweight and very easy to install and use.

Sending HTML Email With Images - PHP Tutorial

Sending HTML Email With Images - Upload Image with PHP - Creating Dynamic Webpages Using PHP and MySQL - Select, Delete, Update..

Contact Us 2.0. :: PHP Form

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

E-Cards 1.1. PHP Script

This script will allow your visitors to send e-cards to their friends. It features admin notification and HTML output.To use the "e-cards" script completely free , the "powered by" link at the bottom of the pages must stay intact.

PHP form with image upload

Advanced Contact Form with email and form field validation.It allows your visitors to send you an email directly from your website.Features: Image Upload, HTML Output, Captcha Image.
About Author

wain

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