Search Results

Search found 7706 results on 309 pages for 'checked'.

Page 3/309 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • How Do i handle both the checked and clicked events in Jquery

    - by Someone
    Say I have a form and onload of that form I have 2 radio buttons say "yes" or "no " I have set of action to perform when we select either one radio button .Say if we select "yes " //Onload of Form if(("#yes:checked")){ $("#table").show(); $("#div1").show(); $("#div2").show(); alert("Checkedd on Load"); } //for click $("#yes").bind('click',function(){ $("#table").show(); $("#div1").show(); $("#div2").show(); alert("Checked by Click"); }); }); Iam Writing the same repeated lines of code for two similar set of events .Is There anyway to combine the "Checked" and "Clicked" events Say if i do inthis way than "Checked" doesnot get called untill "Clicked"?Is there any other way to do it. $("#yes").bind('click',function(){ if(("#yes:checked")){ $("#table").show(); $("#div1").show(); $("#div2").show(); alert("Checked by Click"); } }); });

    Read the article

  • checking all checkboxes are checked using jquery

    - by kumar
    Hello friends I have two button one is SelectAll then MassEdit.. my code for select all is $('#btnAll').click(function() { $('#ExceptionDetails input[type=checkbox]').attr('checked', 'checked'); }); this check all the chekcboxes in my view.. then I have other button code which needs to take only checked checkbox information to send it other page.. to display only checked checkbox users.. $('#btnMassEdit').click(function() { $('#ExceptionDetails input[type=checkbox]').each(function() { if ($(this).attr('checked')) { $('#specialist-tab').tabs('url', 3, '<%=Url.Action("getmasseditexceptions", "Expense", new { @GUI_SPEC_STAT_DSPL = GUI_SPEC_STAT_DSPL, @C_EXCPT_CATG = C_EXCPT_CATG, @C_EXCPT_TYPE = C_EXCPT_TYPE })%>').tabs('enable', 3).tabs('select', 3); return false; } else { alert("please select atleast one exceptin"); $().ShowDialog('Please Select Exception, Select atleast one exception'); return false; } }); }); i have a fieldset which is ExceptionDetails..one field set have only one checkbox.. but my view having multiple fieldsets for differnt exceptions.. I need to check all the filedsset which is checked or not what ever the fieldset checkboxes are check I need to take only that exception to pass to the other page.. thanks

    Read the article

  • jQuery: select checkbox when upload field is clicked

    - by Arne Stephensson
    I'm working on a CMS. When a user wants to replace an existing thumbnail image, they can upload a replacement, and check a checkbox to certify that they are indeed replacing the image. The checkbox seems necessary because otherwise the form submits a blank value (due to the presence of the upload field with no value) and wipes out the existing image without a replacement image being specified. The problem is that I keep forgetting to manually activate the checkbox and the uploaded image does not actually replace the existing one because without the checkbox being clicked, the receiving PHP file does not (by design) process the incoming filename. I suspect that users will have the same problem and I want to keep this from happening by reducing the number of steps required. One solution would be to check the checkbox with jQuery whenever the upload field is clicked. So why doesn't this work: $('#upload_field').click(function () { if ($('#replace_image').attr('checked',true)) { $('#replace_image').removeAttr('checked'); alert('Unchecked'); } else if ($('#replace_image').attr('checked',false)) { $('#replace_image').attr('checked','checked'); alert('Checked'); } });

    Read the article

  • Wrong item checked when filtering ListView in android

    - by aspartame
    I have a ListView with multiple choice entries where some are checked from the beginning using setItemChecked(position, true); I combine this with the filtering option setTextFilterEnabled(true) so it's easy to find a specific entry in the list. The problem is that when I filter the list the entries switch position in the list view. Take for example three entries: 'A', 'B' and 'C' where 'C' is checked beforehand (i.e. the entry at position 3 in the list). When I type a 'C' on the keyboard, only the 'C' entry is displayed (as intended). Now 'C' is not checked anymore, since the entry has moved from the checked position 3 to the unchecked position 1 in the list. This behavior leads to some not very welcome effects in the app. Is there a way to "move the selection with the filtering", i.e. bind the checked state to the entry and not to its initial position in the list? Or do I need to find a new approach? Thanks, Linus

    Read the article

  • Commit changes to a different branch than the currently checked out branch with subversion

    - by Paul Alexander
    I've been working on code checked out from the development line and discovered that the changes made might be breaking changes and need to be moved to an experimental branch before committing to the main dev tree. However, I don't have the experimental branch checked out and I don't want to loose the changes that have already been made. Is there a way to commit the changes in the working folder to a different branch than originally checked out?

    Read the article

  • Uncheck all checkboxes in repeater except checkbox being checked

    - by Chris Laythorpe
    I know my question reads a bit like that 'how much wood can a woodchuck chuck' line, please excuse that... I have a repeater with checkboxes. There are numerous rows in this repeater - I never know how many - I want only one checkbox checked at any time. If the user changes the checked checkbox, any pre-existing checks are unchecked therefore maintaining a single checked checkbox. I am using VB, but comfortable to port any C#. I want to use JQuery. I have been looking on Google, but only ever seem to find ALL checked, ALL unchecked systems. Any suggestions?

    Read the article

  • Radio buttons not checked in jQuery

    - by kd7iwp
    I have this line of code for page load: if ($("input").is(':checked')) { and it works fine when the radio button input is checked. However, I want the opposite. Something along the lines of if ($("input").not(.is(':checked'))) { so that my if statement runs when none of the radiobuttons are selected. What is the best way to go about this?

    Read the article

  • IE - hidden radio button not checked when the corresponding label is clicked

    - by ScottE
    I just noticed a strange behaviour in IE7. I have radio buttons with associated labels as follows: <input type="radio" name="filter" id="filter_1" value="Activities" checked="checked" /> <label for="filter_1">Activities</label> <input type="radio" name="filter" id="filter_2" value="Services" /> <label for="filter_2">Services</label> The radio button is hidden via css with display:none or visibility: hidden (don't ask) The problem is - when I click the label in IE7 (haven't looked at other IE versions yet) the associated radio button is not actually checked. I confirmed this with jquery - the label click event is fired, but the radio button click event is not. A form post also confirms that the checked radio button does not change. This works correctly in firefox, and also works correctly if I remove the CSS that hides the radio buttons. Is this an IE bug or am I missing something?

    Read the article

  • OS X 10.6 won't automatically connect to wireless even though remember network is checked

    - by Hendy
    Upgraded to 10.6 recently. 10.5 would connect to my home network whenever I was home. 10.6 constantly pops up the network selection dialog and asks me what network I want to join. I click my home network and the password is already entered (so it "remembers" the network). "Remember network" is checked... but it does it every time. How do I get 10.6 to connect to networks automatically whenever it sees them?

    Read the article

  • Get Checked RadioButtons using JavaScript

    - by Rudi
    so I’m trying to build a win 8 app, which includes a WebView. The WebView contains the HTML code (+JavaScript) below. <!DOCTYPE HTML PUBLIC " -//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <?xml version='1.0' encoding='UTF-8' standalone='yes'?> <html> <head> <meta http-equiv='Content-Type' content='text/html; charset=utf-8' > <script type='text/javascript'> function get_radio_value() { for (var i=0; i < document.myForm.frage1.length; i++) { if (document.orderform.frage1[i].checked) { var rad_val = document.myForm.frage1[i].value; return rad_val; } } } </script> <title>Kundenfragebogen</title> </head> <body> <h1>Kundenfragebogen</h1> <div id='myDiv'>Hello</div> <form name='myForm' action=''> <table border='2'> <tr> <td></td> <td>sehr gut</td> <td>gut</td> <td>schlecht</td> </tr> <tr> <td>Wie geht es Ihnen?</td> <td><input type='radio' name="frage1" value='1'/>Mir ging es noch nie besser!</td> <td><input type='radio' name="frage1" value='2'/>Es geht mir so wie immer.</td> <td><input type='radio' name="frage1" value='3'/>Heute geht einfach gar nichts…</td> </tr> <tr> <td>Können Sie Auto fahren?</td> <td><input type='radio' name="frage2" value='1'/>Ja</td> <td></td> <td><input type='radio' name="frage2" value='3'/>Nein</td> </tr> <tr> <td>Möchten Sie unseren Newsletter abonnieren?</td> <td><input type='radio' name="frage3" value='1'/>Ja</td> <td></td> <td></td> </tr> </table> <input type='button' value='Formular absenden' onclick="return get_radio_value()"/> </form> </body> </html> So the html contains some radio buttons and a button. I’ve used JavaScript ~2 years ago (just a little), so I don’t really know how to write the exact code. I’ve found something on the internet, but it doesn’t do what I want. I want to have the following: The user can check the RadioButtons. When the user clicks the Button, the JavaScript function should return all the checked radio buttons (I only need to know which RadioButton is checked). Since I know the name of the RadioButtons in my Windows 8 App, I can do the following: var object = WebView.InvokeScript("JavaScriptFunctionNAME", NameOfRadiobutton); So the WebView invokes the script and should get as a return the VALUE of the RadioButton, which is checked. “JavaScriptFunctionNAME” = name of the function in Javascript NameOfRadiobutton = the name of the RadioButton as a parameter (for example “frage1”). Currently I’m returning the value of the radiobutton, which is checked in the RadioGroup “frage1”. How can I check every RadioButton by it’s parameter? By this I mean I have a parameter “frage1” and return the value of the checked RadioButton. After this, I call the function again with the parameter “frage2” and return the checked RadioButtons value. Could anyone help me out with the JavaScript-function?

    Read the article

  • How to check if a checkbox/ radio button is checked in php

    - by user225269
    I have this html code: <tr> <td><label><input type="text" name="id" class="DEPENDS ON info BEING student" id="example">ID</label></td> </tr> <tr> <td> <label> <input type="checkbox" name="yr" class="DEPENDS ON info BEING student"> Year</label> </td> </tr> But I don't have any idea on how do I check this checkboxes if they are checked using php, and then output the corresponding data based on the values that are checked. Please help, I'm thinking of something like this. But of course it won't work, because I don't know how to equate checkboxes in php if they are checked: <?php $con = mysql_connect("localhost","root","nitoryolai123$%^"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("school", $con); $id = mysql_real_escape_string($_POST['idnum']); if($_POST['id'] == checked & $_POST['yr'] ==checked ){ $result2 = mysql_query("SELECT * FROM student WHERE IDNO='$id'"); echo "<table border='1'> <tr> <th>IDNO</th> <th>YEAR</th> </tr>"; while($row = mysql_fetch_array($result2)) { echo "<tr>"; echo "<td>" . $row['IDNO'] . "</td>"; echo "<td>" . $row['YEAR'] . "</td>"; echo "</tr>"; } echo "</table>"; } mysql_close($con); ?>

    Read the article

  • How to open links in new window ONLY IF the check box is checked

    - by Travis
    Here is what i have so far. I have it so they open in new windows, but i want it only if the check box is checked... <!DOCTYPE html> <html> <head> <script> function new() { if ( document.getElementById('checkbox').checked ) window.open( 'y', 'n', 't', 'New Window' ); } else { break; } var OpenNew = document.getElementById('opennew'); OpenNew.addEventListener('click', OpenWin, false ); </script> </head> <body> <p> <form name="test"> <p>Open link in a new window &nbsp; <input type="checkbox" id="checkbox" name="check" /></p> </form> </p> <p> <h2>My favorite Websites to visit</h2> <a href="http://www.youtube.com" target="new" id="y">Youtube</a><br /> <a href="http://www.newegg.com" target="new" id="n">Newegg</a><br /> <a href="http://www.twitch.tv" target="new" id="t">Twitch.tv</a><br /> </p> </body> </html> I am unsure how to actually do the if statement if it is checked then open. It does currently open in a new tab.. i just need it to be only when its checked. Any help with this will be greatly appreciated! Thanks!

    Read the article

  • Set @Html.RadioButtonFor as Checked by default

    - by minchiya
    I am not able to set the default radio button to "Checked" ! I am using @Html.RadioButtonFor : <div id="private-user"> @Html.RadioButtonFor(m => m.UserType, "type1", new { @class="type-radio" , **@Checked="checked"** }) 1 </div> <div id="proff-user"> @Html.RadioButtonFor(m => m.UserType, "type2", new { @class="type-radio" }) 2 </div> Is it possible to set a radio button as cheched using @Html.RadioButtonFor ? Thx

    Read the article

  • ASP.NET Binding integer to CheckBox's Checked field

    - by Sung Meister
    I have a following ListView item template, in which I am trying to bind integer value to Checked property of CheckBox. IsUploaded value contains only 0 and 1... <asp:ListView ID="trustListView" runat="server"> <ItemTemplate> <asp:CheckBox ID="isUploadedCheckBox" runat="server" Checked='<%# Bind("IsUploaded") %>' /> </ItemTemplate> </asp:ListView> But ASP.NET complains that Exception Details: System.InvalidCastException: Sepcified cast is not valid Even though following code using DataBinder.Eval() works, I need to have a 2-way binding, thus need to use Bind(). <asp:CheckBox ID="isUploadedCheckBox2" runat="server" Checked='<%# Convert.ToBoolean( DataBinder.Eval(Container.DataItem, "IsUploaded"))) %>' /> How can I convert 0's and 1's to boolean using Bind()? [ANSWER] I have extended auto-generated type through partial class by adding a new property mentioned in the answer by Justin

    Read the article

  • edge case for selecting a checked radio input with jquery

    - by altvali
    Hi all! I have a problem selecting a checked radio button with jquery. The radio buttons are generated by a function from a MVC that i'd rather not change and its name is like id[number]. Simply put, I have to check if any of these buttons are checked: <input type="radio" name="id[1]" value="1"/ <input type="radio" name="id[1]" value="2"/ The problem is that jQuery('input:radio[name=id[1]]:checked').val() will select some function from the jQuery library. Any help will be much appreciated.

    Read the article

  • Jquery - check if atleast one checkbox is checked

    - by Vincent
    All, I have the following HTML form and it can have many checkboxes. When the submit button is clicked, I want the user to get a javascript alert to check atleast one checkbox if none are checked. Is there an easy way to do this using Jquery? <form name = "frmTest" id="frmTest"> <input type="checkbox" value="true" checked="true" name="chk[120]"> <input type="checkbox" value="true" checked="true" name="chk[128]"> <input type="checkbox" name="chk[130]"> <input type="checkbox" name="chk[143]"> <input type="submit" name="btnsubmit" value="Submit"> </form> Thanks

    Read the article

  • Check if checkbox is checked or not (ASPX)

    - by cthulhu
    I have the following code: (some.aspx.cs) if(Page.IsPostBack) { bool apple2 = false; bool pizza2 = false; bool orange2 = false; if (apple.Checked) apple2 = true; if (pizza.Checked) pizza2 = true; if (orange.Checked) orange2 = true; } (some.aspx) <tr> <td>Food:</td> <td>Apple <input type="checkbox" name="food" id="apple" value="apple" runat="server" />Pizza <input type="checkbox" name="food" id="pizza" value="pizza" runat="server" />Orange <input type="checkbox" name="food" id="orange" value="orange" runat="server" /></td> Now, i send the Boolean variables to SQL database. The problem is only with unchecked boxes. I mean, when you check some checkboxes it sends it as true (and that's right) but when i uncheck them it remains the same (true).

    Read the article

  • Html.CheckBoxFor() checked problem in ASP.Net MVC 2

    - by inolen
    It doesn't seem that the Html.CheckBoxFor helper adds the correct "checked" attribute when rendering the HTML. I have a bool property rendered like so: <%= Html.CheckBoxFor(m => m.Visible) %> And the outputted HTML is this: <input type="checkbox" value="true" name="Visible" id="Visible"> Is there some particular reason it does not add the "checked" attribute when the value is true?

    Read the article

  • Change color of CheckboxColumn if checked

    - by user896692
    Searched a lot about this problem but never found a answer, that solved it. I´ve got the following CheckboxColumn in a WPF datagrid: <DataGridCheckBoxColumn Header="Erledigt" Binding="{Binding Path=erledigt}" /> The variable erledigt contains 0 or 1. Now I want, that if the Checkbox is checked, the cellbackground is green. Hopelessly searched for a checked property. How can I manage this?

    Read the article

  • Mootools set radio button checked

    - by Gobi
    Hi i have 2 radio buttons and i used mootool while loading as window.addEvent('domready', function() { var chk="1"; if(chk==1){ $('edit-gender-0').set('checked',true); } else if(chk==2){ $('edit-gender-1').set('checked',true); } but its not working at all. any one help me will be more appreciated... and anyother short way without if condition

    Read the article

  • Why is C++0x's `noexcept` checked dynamically?

    - by rlbond
    I am curious about the rationale behind noexcept in the C++0x FCD. throw(X) was depreciated, but noexcept seems to do the same thing. Is there a reason that noexcept isn't checked at compile time? It seems that it would be better if these functions were checked statically that they only called throwing functions within a try block.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >