Ad block is installed and active. Please support us by disabling it.
HomeSunday, December 17, 2017, 04:24:07
4

How to check checkbox checked

Wednesday, February 18, 15, 17:43:45, 3 Yaers Ago Via cilipe, Hits: 3638
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 Form Validation

PHP form validation :: PHP tutorial, requirement(s): PHP Server

PHP $_GET Function

Get function in PHP

Preg_Match - PHP Email Validation

Validate email with preg_match in php

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.

Inserting form data in MySql table

Inserting form data in MySql table with PHP

PHP Links Script 1.1.

This script allows you to manage your links using a MySQL database. It features easy install, user submission, and an admin panel to add, edit and remove categories and links. The script is easy to customize to suit your needs.

Site Recommendation

This script will allow your visitors to recommend your site to their friends.

GuestBook PHP Script

Allow visitors to leave messages on your site. It features easy install, admin notification, and control panel to remove unwanted entries.

PHP/MySQL Bookmarklet - PHP Tutorial

PHP/MySQL bookmarklet, bookmark current page, PHP/MySQL tutorial.

Addslashes - Stripslashes

addslashes — quote string with slashes, stripslashes — un-quotes a quoted string
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.