JQuery :: Mutually Exclusive Check Box
Apr 23, 2009
I have two check box. My requirment is if check one check box the other check box should be unchecked.Both should be mutually exclusive when checked. But both can be unchecked at the same time.[code]
View 6 Replies
ADVERTISEMENT
Feb 9, 2009
My problem mostly stems out of not knowing how to implement my problem, maybe someone in the jquery world can help. I need a grid to show a list of events. Think for example soccer matches. So for each you can pick the home team, draw or away team. The choice must be mutually exclusive for each match. My current solution has an extra column with a dropdown for your result.
I would like the actual items to be selectable. Im not forced to use a grid. A repeater would work too. The data source which is an object has the home and away team logo's, a match ID which is hidden from the user and a boolean value for home, draw and away. The latter boolean values are mutually exclusive.
So in essence I'd like to have a solution where you can click the home team logo and it will check the home boolean value and highlight the home team logo or select it in some way. The user should only see Home Team Logo, Draw and Away team logo and click on his pick. If he changes his selection then his old selection should be de-selected.
View 3 Replies
View Related
May 15, 2010
Is there any exclusive Firefox DOM property or method? Such as [url].. of Opera and [url]... of IE.
View 6 Replies
View Related
Oct 4, 2011
Here is the HTML: [URL] I'm trying to uncheck the selected radio button, then set the value to 1 (Yes), basically overwriting theinitialvalue to 1. I've looked at prop(), val(), and attr(), and just don't know where to start. Should I select $('#set_q157 input') or$('#set_q157 input:radio'), or each individual radio?
Do I need to each them, and check if its checked, then change its value, or is there a way to select all three inputs as just one radial button? It would also need to work if the input has not yet been checked.
View 4 Replies
View Related
Jan 28, 2009
I want a function that when you check on a check box another check box appears.
View 10 Replies
View Related
Mar 29, 2006
i have a list of checkboxes, the number of checkboxes is dynamic. All the checkboxes have same name. i am trying to get the length of selected checkboxes.
<input type=checkbox name=name1 value=1>
<input type=checkbox name=name1 value=2>
........ get dynamically.
when i try to get the length in javascript like document.form.name1.length, it works fine if number of checkboxes selected are more than 1, but not for 1.
View 1 Replies
View Related
Mar 11, 2010
I have a code that I got from a tutorial website. The goal is when someone clicks the first check box with the value of yes then the two other sets of check boxes will autmatically be checked for no.
The issue is their are three sets of 2 check boxes each.
So here is my code code I am trying to use
PHP Code:
Here is my form code
PHP Code:
So Ideally when a representative clicks that the customer has three services (clicks the Yes checkbox) all the other checkboxes will default to No.
How I would change the above javascript to do this.
View 1 Replies
View Related
Nov 9, 2011
I am a php programmer and not a Javascript programmer and I am trying to help a friend out with his shopping cart. The original programmer (who wrote this years ago and is no longer around) has a button that looks up the quantities in the database for the submitted items, and then displays a prompt if you selected a quantity that is less than the minimum purchase amount.The issue is if the user enters a smaller amount than allowed and hits the enter key instead of the "Buy" button, it allows the order.how to use the current code to also check for an Enter key submission.I can handle the PHP and the db lookup for minimum quantities. Here is the page code and the Javascript code.
Code:
<a href="javascript:checkQuantity(document.form<?php echo $formCount; ?>,
<?php echo $row_rsProduct['lotQty']; ?>,
[code]....
View 3 Replies
View Related
Jul 18, 2009
I have an .asp page for my customers which does just accepts e-mail information and passes this information to another .asp page. But before passing the info, a javascript checks whether the entered e-mail does match some certain rules. Rule1: If any input has been made at all, Rule2: If an "@" sign is there, if the"." is there and so on. upon pressing the submit button, the first rule works but the second rule does not. Could not figure it out why.
[Code]...
It is the function control() which validates the e-mail field. But it just validates whether the e-mail has been entered or not. The second check (with the @ sign) is not being made.
View 1 Replies
View Related
Apr 19, 2010
I'm working a bunch of pre existing code on a CMS. Just after a quick fix. Doing a show/hide thing on a particular div somewhere on the page depending if a checkbox is ticked or not.Currently there is 3 checkboxes that are dynamically added through the CMS. Here's simplified version of the form:
<form id="simplesearch" name="simplesearch">
<input type="checkbox" onclick='showhidefield(this.value)' name="meta_data_array_search_criteria[custom_profile_type][]" value="5" class="input-
[code]....
View 2 Replies
View Related
Sep 27, 2009
<input type="checkbox" id="priority" /><span class="presult">0 USD</span>
I want when checkbox is checked, the span will have 500 USD. When checkbox is unchecked the span will return 0.This is what I've got, have no idea why not work.
Code JavaScript:
if ($('#priority').is(':checked')) {
$('.presult').text('500 USD');
[code]......
View 1 Replies
View Related
Oct 21, 2010
i need to check to see if my check box is checked, here is my code...
echo "<form id='form1' name='form1' method='post' action='".$href."' onsubmit='return checked_room()'>";
while($row = mysql_fetch_assoc($res))
{
[Code]....
now for some reason i can't get the javascript to work within the function.
View 2 Replies
View Related
Jun 5, 2010
How can i select max 2 check box from 10 check box.following code i used for check box
PHP Code:
<input type='checkbox' name='r1[]' value="<?php echo $bno;?>"?>>
What code can be design in JS
View 4 Replies
View Related
Mar 28, 2010
I am new to jquery.I have made a function, that should only work if my attribute style on ul is not 0. However I think I am doing it wrong. I want to check the value of style attribute, not the string.[code]
View 1 Replies
View Related
Dec 6, 2010
i have a table that displays items for my shopping cart. i use ajax and prepend the added item to the table. For my employees sake,i zebra stripe the rows to make the cart easier to view and i highlight the first row in a blue color. When my employee scans an item it is prepended to the table so its always first.
when a new item is scanned i prepend it to the table highlighted. when another item is scanned i am able to remove the highlight of the previous scanned item and add highlight to the new scanned item. my problem is, after i remove the highlight it makes the background white and for everyother item scanned after. The logic im thinking is after i remove the highlight, check wether to see if the row is odd or even and to color it white or the zebra stripped color. Is there a better way to do this. otherwise i would like to know how to check if the row is even or odd.
View 1 Replies
View Related
Jul 2, 2010
if i have defined a div on my page
<div
class
="Answer"
style
="display: none;"
>
then i wrote some jquery to make it shown or hidden
now i want write jquery to do different things if based on whether the div is visible or not?
How to check its visibility using jquery?
View 1 Replies
View Related
Apr 5, 2010
I'm using JQuery 1.3 and was wondering how to check if at least one checkbox on my page is checked where each checkbox looks like this ...
<input type
="checkbox
" value
="####
" name
="x_invoice_num[]
" />
where "####" varies between the checkboxes.
View 1 Replies
View Related
Oct 27, 2009
how can i check if a DIV with the ID xyz exist?
View 4 Replies
View Related
May 15, 2009
how to uncheck the check box , when i check another check box, for example having 4 check boxes, be default check box is checked ,. when i check the check box 2 , then need to uncheck the checked one, How to do this in jquery ,
[Code]...
View 3 Replies
View Related
Sep 30, 2010
I would like to check the value in an input box and if the value has changed, then perform the action. Being a newbie at Jquery, I am not sure about the syntax.
var timeout = undefined;
var str = ''; /* Get the initial value and if changed, do something */
$('#input_box').live('keyup', function() {
if(timeout != undefined) {
clearTimeout(timeout);
}
var timeout = setTimeout(function() {
timeout = undefined;
/* Do something */
$('#log').append('<div>Handler for input_box .keyup() called.</div>');
}, 1500);
});
View 1 Replies
View Related
Sep 17, 2010
I have a form with three different fields. Each field is an array made of checkboxes. I'd like to have three "checkall" checkboxes, one for each field, so that you only click once to select every checkbox of the array (or rather of what will be treated as an array server side).How would you do that? Could you point me to a possible scenario? I've spent a few hours on this problem without reaching any interesting result
View 1 Replies
View Related
Feb 25, 2009
How can I check that at least one value should be selected in MULTISELECT listbox through JQUERY.
View 8 Replies
View Related
Mar 25, 2011
I am developing a web application in which user can change the theme of the page.
So for this i am changing href attribute of the link tag on selection of the perticular theme.
Problem is that when i change the theme whole page gets messed up till the new css fileis fully loaded.
So how can I check if the CSS file is completely loaded or not?
View 1 Replies
View Related
Feb 14, 2011
I have this form
<form method="post" action="urlymsite">
Name<input name="name"> <br />
Autor <input name="autor"><br />
telephone<input name="telephone"></td><br />
[Code].....
I would like to cycle all the input fields of the form and see if there is at least input fields empty.
I would like to use the .each(),avoiding the control field to field,
View 1 Replies
View Related
May 26, 2011
I've a problem when I'm trying to check and uncheck a checkbox. It work great when doing everythingprogrammatic, but when I check or uncheck using the mouse and then try to check or uncheck using the code doesn't work anymore.I tried with both ways:
$('#myCheck').attr('checked', true); // to check
$('#myCheck').attr('checked', false); // to uncheck
and:
[code]....
View 4 Replies
View Related
Jun 22, 2010
How to check if an attribute is present in an HTML tag ?
Suppose if i have a label tag for e.g. [url]...
"data-company" is my custom attribute as defined in HTML 5.
So how do I check if the label under consideration has attribute called "data-company" ?
View 2 Replies
View Related