Posts

Showing posts with the label checkbox

Show total checkbox count on multiple locations on the same page

Image
Clash Royale CLAN TAG #URR8PPP Show total checkbox count on multiple locations on the same page Im am using the following code to count the check boxes and display the total count and its working fine. But now i want to display the total count on two different locations on the same page, but it does not work. What am i doing wrong ? <input type="checkbox" name="E33" />A <input type="checkbox" name="E34" />B <input type="checkbox" name="E66" />C <p id="result">Total Number of Items Selected = <p> <p id="result">Total Number of Items Selected = <p> *also show total count inside the text input <input type="text" id="result" name="total" placeholder="show total count"/> <script> showChecked(); function showChecked(){ document.getElementById("result").textContent = "Total Num...

How to make a checkbox unchecked based on another checkbox selection?

Image
Clash Royale CLAN TAG #URR8PPP How to make a checkbox unchecked based on another checkbox selection? I have 6 checkboxes in my application. <input type="checkbox" name="vehicle" id="vehicle1" value="one">one<br> <input type="checkbox" name="vehicle" id="vehicle2" value="two">two<br> <input type="checkbox" name="vehicle" id="vehicle3 value="three">three<br> <input type="checkbox" name="vehicle" id="vehicle4" value="four">four<br> <input type="checkbox" name="vehicle" id="vehicle5" value="five">five<br> <input type="checkbox" name="vehicle" id="all" value="all">all<br> And I have this jquery function, which would disable every other checkbox if the "all" chec...

Issue with extjs checkbox header

Image
Clash Royale CLAN TAG #URR8PPP Issue with extjs checkbox header I'm currently implementing part of a project in ExtJS, the requires me to modify an existing grid to only show checkboxes on rows with a certain status(different than AN, NP, RS), this status is determined by the value in record.data.codiceStato : selectionModel = Ext.create('Ext.selection.CheckboxModel', {checkOnly : true, listeners : { select:function(sm, idx, rec ){ alert("Look ma!"); }, beforeSelect : function(sm, idx, rec ) { if(idx.data.codiceStato == 'RS' || idx.data.codiceStato == 'AN' || idx.data.codiceStato == 'NP') return false; } } ,renderer : function(value, metaData, record, rowIndex, colIndex, store, view) { if(record.data.codiceStato != 'RS' ...