HomeMonday, June 18, 2018, 15:27:09
4

How to check checkbox checked

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

Tell A Friend with Captcha

This form allows your visitors to suggest your site to a friend. It features an HTML email format and an admin notification email.

PHP Fwrite : fwrite

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

PHP Form Action Self Submit

PHP form action self submit tutorial, requirement(s): PHP server

PHP getdate

Returns an associative array containing the date information of the timestamp, or the current local time if no timestamp is given.

Password Protect With PHP

Password protect tith PHP - tutorial

Smarty Paginate Example - Smarty Pagination with PHP

Smarty Paginate Example, Smarty Pagination with PHP. SmartyPaginate: a class/plugin for data set pagination within the Smarty template environment

Images In Textarea - CSS

Tutorial Images in Textarea

Preg_Match - PHP Form Validation

PHP form validation with preg_match

Captcha V2 - Free PHP Script

PHP Captcha protection image Version 2, - Requirement(s): PHP Server, GD Library

PHP Write to File

PHP Write to File :: PHP Tutorial, requirement(s): PHP server
About Author

wain

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