Search Results

Search found 1532 results on 62 pages for 'fm radio'.

Page 9/62 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • C# Help For Adding Radio Button For MenuStrip.

    - by Gayan J
    Im a beginner for C# language.So i need a help from who genius from this scheme.i need to add a radio button for menu strip. i already change "clickonclick" property to "true".but i need a option like radio button selection. you can see it from windows calculator menu bar.(click View) how can i get to it via using menustrip peoperty.

    Read the article

  • post row where radio button is checked

    - by ognjenb
    View: <form id="numbers-form" method="post" action="/Numbers/Numbers"> <table id="numbers"> <tr> <th> prvi_br </th> <th> drugi_br </th> <th> treci_br </th> </tr> <% int rb = 1; %> <% foreach (var item in Model) { %> <tr> <td> <%= Html.Encode(item.prvi_br) %> <input type="radio" name="<%= Html.Encode(rb) %>" value="<%= Html.Encode(rb) %>" id='<%= Html.Encode(item.prvi_br) %>'/> </td> <td> <%= Html.Encode(item.drugi_br) %> <input type="radio" name="<%= Html.Encode(rb)%>" value="<%= Html.Encode(rb) %>" id='<%= Html.Encode(item.drugi_br) %>'/> </td> <td> <%= Html.Encode(item.treci_br) %> <input type="radio" name="<%= Html.Encode(rb)%>" value="<%= Html.Encode(rb) %>" id='<%= Html.Encode(item.treci_br) %>'/> </td> </tr> <% rb++; %> <% } %> </table> <p> <input type="submit" value="Save" /> </p> </form> Controller action: [HttpPost] public ActionResult Numbers(int[] rb) { brojevi br = new brojevi(); for (int i = 1; i <= rb.Length; i++) //in this line I have error:Object reference not set to an instance of an object. { br.prvi_br = i; br.drugi_br = i+1; br.treci_br = i+3; } numbers.AddTobrojevi(br); numbers.SaveChanges(); return View(); } I try to post data row in wich radio button is checked but failed, what is wrong??

    Read the article

  • Selecting and deselecting radio buttons

    - by Vivek Kalkur
    I am developing a quiz application which consists of a question and three options and I am using radio buttons for these options.My query is,I click on one of the options and whenever i want to click another option, the previous option remains in the checked state and it does the same whenever I click on the third option too. I need a solution where in it behaves as a natural radio button,only one option is checked at any point of time.

    Read the article

  • How can I make QSSTV recognise my sound device

    - by hellocatfood
    After reading this article from Instructables I wanted to try it out in Ubuntu. Luckily QSSTV is available but I'm having problems getting it to work properly. When pressing the green light (to receive data) I get this error: After going to Options Configure Interfaces I discovered that it's attempting to use /dev/dsp which doesn't appear to exist. In my /dev folder there are no files that reference sound devices and I've tried all of the devices in /dev/snd but unfortunately none of them work. Is there a specific audio device that I should be linking to?

    Read the article

  • ASP.NET MVC2 Radio Button generates duplicate HTML id-s

    - by Dmitriy Nagirnyak
    Hi, It seems that the default ASP.NET MVC2 Html helper generates duplicate HTML IDs when using code like this (EditorTemplates/UserType.ascx): <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<UserType>" %> <%: Html.RadioButton("", UserType.Primary, Model == UserType.Primary) %> <%: Html.RadioButton("", UserType.Standard, Model == UserType.Standard) %> <%: Html.RadioButton("", UserType.ReadOnly, Model == UserType.ReadOnly) %> The HTML it produces is: <input checked="checked" id="UserType" name="UserType" type="radio" value="Primary" /> <input id="UserType" name="UserType" type="radio" value="Standard" /> <input id="UserType" name="UserType" type="radio" value="ReadOnly" /> That clearly shows a problem. So I must be misusing the Helper or something. I can manually specify the id as html attribute but then I cannot guarantee it will be unique. So the question is how to make sure that the IDs generated by RadioButton helper are unique for each value and still preserve the conventions for generating those IDs (so nested models are respected? (Preferably not generating IDs manually.) Thanks, Dmitriy,

    Read the article

  • Shopify: Replacing Product Radio Buttons With Dropdown Select

    - by Wade D Ouellet
    Hi, With Shopify I am trying to alter my product template to display a dropdown select list instead of radio buttons for my product variants. I managed to do this but when you try and add a product to the cart from the list it says, "No variant ID was passed." Here is the code for their radio buttons: <ul id="product-variants"> {% for variant in product.variants %} <li> {% if variant.available %} <input type="radio" name="id" value="{{variant.id}}" id="radio_{{variant.id}}" style="vertical-align: middle;" {%if forloop.first%} checked="checked" {%endif%} /> <label for="radio_{{variant.id}}"><span class="sku">{{ variant.sku }}</span> {%if variant.title != 'Default' %}{{ variant.title }} for {%endif%} <span class="price">{{ variant.price | money_with_currency }}</span></label> {% else %} <del style="margin-left: 26px">{{ variant.title }}</del>&nbsp;<span>Sold Out!</span> {% endif %} </li> {% endfor %} </ul> Here is the code for my dropdown select at this point: <select id="product-variants"> {% for variant in product.variants %} <li> {% if variant.available %} <option value="{{variant.id}}" selected="selected"><span class="sku">{{ variant.sku }}</span> {%if variant.title != 'Default' %}{{ variant.title }} for {%endif%} <span class="price">{{ variant.price | money_with_currency }}</span></option> {% else %} <del style="margin-left: 26px">{{ variant.title }}</del>&nbsp;<span>Sold Out!</span> {% endif %} </li> {% endfor %} </select> Thanks, Wade

    Read the article

  • Changing classes on multiple divs when selecting specific radio buttons

    - by Rob
    Hey everyone I got a javascript problem I can't seem to find a specific solution for on the web. What I want to be able to do is select one of the radio buttons and have that change the class of #home-right to either .rackmount or .shipping and add the class of .displaynone to the type of dimensions I don't want shown. <div id="home-right" class="rackmount"> <h4 class="helvneuebcn">Case Finder</h4> <div class="cta-options"> <input type="radio" value="Shipping and Storage" name="" checked> Shipping and Storage<br/> <input type="radio" value="Rackmount Enclosures" name=""> Rackmount Enclosures<br/> </div> <div class="shipping-dimensions displaynone"> <div class="dimensions"><input type="text" class="size"><span class="helvneuemd">H x </span></div> <div class="dimensions"><input type="text" class="size"><span class="helvneuemd">W x </span></div> <div class="dimensions"><input type="text" class="size"><span class="helvneuemd">L</span></div> </div> <div class="rackmount-dimensions"> <div class="dimensions"><input type="text" class="size"><span class="helvneuemd">U Height x </span></div> <div class="dimensions"><input type="text" class="size"><span class="helvneuemd">Rack Depth</span></div> </div> <div class="clear"></div> <input type="button" value="Submit" class="findcase"> </div>

    Read the article

  • Insert HTML on Radio Label on Formtastic

    - by Adrian Matteo
    I have a form that has a radio button on it (Formtastic), and It works just fine with the :collection I'm passing. The problem is I want some part of the text to be affected by some CSS, but the :collection attribute does not let me put in HTML. Here's my code: = subscription.input :plan_type_id, :as => :radio, :label => false, :wrapper_html => {:class => "plan_type"}, :collection => { @plans[:premium_yearly][:description]+number_to_currency(@plans[:premium_yearly][:amount], :precision => 2) => @plans[:premium_yearly][:value], @plans[:premium_monthly][:description]+number_to_currency(@plans[:premium_monthly][:amount], :precision => 2) => @plans[:premium_monthly][:value] } Has you may may see, I build the label I want to show with my @plans variable and the :collection attribute. Is there any way I can modify the way it renders the label, I want to put some css to some part of the label. I want something like this: = subscription.input :plan_type_id, :as => :radio, :label => false, :wrapper_html => {:class => "plan_type"}, :collection => { @plans[:premium_yearly][:description]+'<b>'+number_to_currency(@plans[:premium_yearly][:amount], :precision => 2)+'<\\b>' => @plans[:premium_yearly][:value], @plans[:premium_monthly][:description]+'<b>'+number_to_currency(@plans[:premium_monthly][:amount], :precision => 2)+'<\\b>' => @plans[:premium_monthly][:value] } Thanks in advanced.

    Read the article

  • Get index values for an array to print in value attribute for radio buttons

    - by kexxcream
    Problem: To get the index values of an array to print accordingly in value attribute of radio buttons. The array $_SESSION['items']: Array ( [2] => Array ( [category] => 2 [question] => Array ( [6] => Källorna refereras separat [7] => Vissa försök till sammanbindning [8] => En del sammanfattningar [9] => Olika forskningslinjer jämförs och sammanfattas [10] => Kontraster, jämförelser, sammanfattningar; centrala likheter och skillnader framhävs ) [title] => Integration av källorna ) ) I have a PHP function that looks like this: function itemsLayout ($array) { for ($i = 1; $i <= count($array['question']); $i++) { $form .= '<input type="radio" name="'.$array['category'].'" id="'.$array['category'].'" value="INDEX VALUE FOR QUESTION ARRAY HERE">'; } return $form; } PHP code: I get the index by using the following: $key = key($_SESSION['items']); $current = $_SESSION['items'][$key]; And I print the first index by using: echo itemsLayout($current); Question: How do I get the index values 6, 7, 8, 9, 10 to print in the value attribute for each radio button?

    Read the article

  • How to check the correct radio button.

    - by MrW
    I have a Table containing some information that I need. All these rows also contains a column with a radio button in it so that the user is suppose to be able to check one of the rows as default. When I'm bringing the data back from the DB and want to select the one that's currentlly the default one. <% foreach (var item in (IEnumerable<Locale>) ViewData["Locales"]) { %> <tr> <td> <%= Html.Encode(item.Language.Name) %> </td> <td> <input type="radio" id="defaultLocale" name="defaultLocele" value="on" checked="<%= item.Default == false ? "false" : "true" %>" /> </td> I've also tried to do this: <input type="radio" id="defaultLocale" name="defaultLocele" value="on" checked="<%=item.Default == false ? "" : "checked" %>" /> but nothing seems to do the right thing. I always end up with having the last row in checked, which it isn't for sure.

    Read the article

  • posting multiple radio button values to mysql using "foreach"

    - by jeansymolanza
    i have adjusted my code slightly but i am still having difficulty posting it to the table. could someone please provide me with an example of the foreach array? form page <div style="padding: 15px;"> <span class="loginfail" style="font-size:24px; font-weight: bold">Notifications</span><p> <?php include("progress_insertcomment.php"); ?> <?php // Make a MySQL Connection mysql_select_db("speedycm_data") or die(mysql_error()); $query_comment = "select * from tbl_alert order by id desc limit 1"; $comment = mysql_query($query_comment, $speedycms) or die(mysql_error()); $row_comment = mysql_fetch_assoc($comment); $totalRows_comment = mysql_num_rows($comment); ?> <!--- add notification ---> <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>"> <span id="sprytextarea1"> <textarea id='comment' name="comment" style="height: 75px; width:330px;"><?php echo $row_comment['comment']; ?></textarea> </span> <p> <button type="submit">Add</button> <input type="hidden" name="notc" value="1"/> </form> <!--- notification history ---> <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>"> <table border="0" cellspacing="2" cellpadding="2"> <?php if ( $row_comment == 0 ) { echo "<span style='font-size: 11px;'>No current alerts.</span>"; } else { // Get all the data from the "example" table $result = mysql_query("SELECT * FROM tbl_alert ORDER BY id DESC") or die(mysql_error()); while($rows=mysql_fetch_array($result)){ ?> <tr> <td> <?php echo "<div class='bubble'><div class='pimped'> <blockquote>" . $rows['comment'] . " </blockquote></div> <cite><strong>" . $rows['user'] . "</strong> @ " . $rows['date'] . "</cite> <span style='font-size: 10px;'> <p> <a href='editalert.php?id=". $rows['id'] ."' class='form' >Edit</a>&nbsp;&#8226;&nbsp;<a href='deletealert.php?id=". $rows['id'] ."' class='form'>Delete</a> </span> </div> "; ?> </td> <td valign="top" align="center"><div style="padding-left: 30px;"><span style="font-size: 10px;">Completed?</span> <p class="field switch"> <!--- determine status of notification ---> <?php $status = $rows['status']; ?> <input type="radio" name="selstatus" value="no" <?php if($status == 'yes') {echo 'checked';} else {echo '';} ?>/> <input type="radio" name="selstatus" value="yes" <?php if($status == 'yes') {echo 'checked';} else {echo '';} ?>/> <input type="hidden" name="statusid" value="<?php echo $rows['id']; ?>"/> <label for="radio1" class="cb-enable <?php if($status == 'yes') {echo 'selected';} else {echo '';} ?>"><span>Yes</span></label> <label for="radio2" class="cb-disable <?php if($status == 'no') {echo 'selected';} else {echo '';} ?>"><span>No</span></label> </p> </div></td> </tr> <tr> <td></td> <?php } } ?> <td align="center"><div style="padding-left: 30px;"> <button type="submit">Update</button> <input type="hidden" name="notc2" value="1"/> </div></td> </tr> </table> </form> </div> </body> processing <?php // 6) update notifications if (array_key_exists('notc2',$_POST)) { echo "<p style='font-size: 12px;'>Thank you. The notifications have been updated successfully.<p>"; echo "<p><span style='font-size: 12px;'> <a onClick=\"history.go(-1)\" class='form'>Return</a></p> <p></span> "; exit; }; ?> after doing some research i learnt that the only way to insert multiple radio values into the MYSQL table is to use arrays. there was a similar question raised somewhere on this site: http://stackoverflow.com/questions/1656260/php-multiple-radio-buttons that recommended using a foreach loop. use a foreach loop <?php foreach ( $_POST as $key => $val ) echo "$key -> $val\n"; ?> $key will be the name of the selected option and $val, well, the value. how would this apply to my situation as i am struggling to find any help on the internet. i understand that i would use this on the processing page to pull out any radio values from the previous page and then loop the INSERT MYSQL code within the process until it was all done. any advice would be appreciated! GOD BLESS.

    Read the article

  • HTML form never calls Javascript

    - by user1205577
    I have a set of radio buttons defined in HTML like so: <input type="radio" name="group" id="rad1" value="rad1" onClick="doStuff(this.id)">Option 1<br> <input type="radio" name="group" id="rad2" value="rad2" onClick="doStuff(this.id)">Option 2<br> Just before the </body> tag, I have the following JavaScript behavior defined: <script type="text/javascript"> /*<![CDATA[*/ function doStuff(var id){ alert("Doing stuff!"); } /*]]>*/ </script> When I run the program, the page loads as expected in my browser window and the radio buttons allow me to click them. The doStuff() function, however, is never called (I validated this using breakpoints as well). I also tried the following just to see if inline made the difference, but it seems the JavaScript is never called at all: <script type="text/javascript"> /*<![CDATA[*/ alert("JavaScript called!"); main(); function main(){ var group = document.getElementsByName('group'); for(var i=0; i<group.length; i++){ group[i].onclick = function(){ doStuff(this.id); }; } } /*]]>*/ </script> My question is, is there something special I need to do using HTML and JavaScript in this context? My question is not whether I should be using inline function calls or whether this is your favorite way to write code.

    Read the article

  • PerformClick() for a radio button not working

    - by anup
    There is a usercontrol which has a radio button and that user control is called in a dialog box. I have written an onclick event for radio button and used performclick() to call it. But even though performclick() is being executed without any exception, it's not performing on click action. It's neither calling on click function nor reflecting a check in UI. But the on-click event works perfectly if I click it manually in the UI. I am using VS2010 and to test the case I created a helloworld project. I observed the app worked well when the Causesvalidation property of radiobutton is false, but doesn't when that validation property is true. How can I fix this? More: As I researched more I found out that Performclick doesn't work well when controls are called inside other controls and when this is done for many layers. It was same in my case, there were four layers to reach my radiobutton. So I replaced the prformclick function by calling onclick function directly and then making radiobutton.checked = true inside that function.

    Read the article

  • Rails: radio button selection for nested forms objects

    - by satynos
    I have the following form for photo_album which uses the nested forms feature of the Rails in saving the photos while updating the photo_album. And having trouble with the selection of radio button value. I want only one of the photos be able to select as the album cover, but due to the way rails produces form element ids and names, I am able to select all of the photos as album covers. Is there any workaround? <% form_for @photo_album do |f| %> <%= f.error_messages %> <% @photo_album.photos.each do |photo| %> <% f.fields_for :photos, photo do |photo_fields| %> <p> <%= image_tag url_for_image_column(photo, "data", :thumb) %> </p> <p> <%= photo_fields.label :title %> <%= photo_fields.text_field :title %> </p> <p> <%= photo_fields.label :body %> <%= photo_fields.text_area :body %> </p> <p> <%= photo_fields.radio_button :cover, "1" %> <%= photo_fields.label :cover, 'Album Cover', :class => 'option' %> <%= photo_fields.check_box :_delete %> <%= photo_fields.label :_delete, 'Delete', :class => 'option' %> </p> <% end %> <% end %> <p> <%= f.submit @photo_album.new_record? ? 'Create' : 'Update' %> </p> <% end %> And following is the html produced by rails (which is part of the problem) for radio buttons: <p> <input type="radio" value="1" name="photo_album[photos_attributes][0][cover]" id="photo_album_photos_attributes_0_cover_1"/> <label for="photo_album_photos_attributes_0_cover" class="option">Album Cover</label> <input type="hidden" value="0" name="photo_album[photos_attributes][0][_delete]"/><input type="checkbox" value="1" name="photo_album[photos_attributes][0][_delete]" id="photo_album_photos_attributes_0__delete"/> <label for="photo_album_photos_attributes_0__delete" class="option">Delete</label> </p>

    Read the article

  • jQuery Validation - Highlight Radio Labels Only

    - by Michael
    I'm trying to use jQuery validation to highlight the labels for my radio buttons only, and not the labels for my other inputs. I have a label for my radio button set called 'type'. I can't seem to get it to work! $(document).ready(function(){ $("#healthForm").validate({ highlight: function(element, errorClass) { $(element).addClass(errorClass) $(element.form).find("label[for='type']") .addClass("radioerror"); }, unhighlight: function(element, errorClass) { $(element).removeClass(errorClass) $(element.form).find("label[for='type']") .removeClass("radioerror"); }, errorPlacement: function(error, element) { } }); });

    Read the article

  • jQuery Highlight Radio Labels Only

    - by Michael
    I'm trying to use jQuery validation to highlight the labels for my radio buttons only, and not the labels for my other inputs. I have a label for my radio button set called 'type'. I can't seem to get it to work! $(document).ready(function(){ $("#healthForm").validate({ highlight: function(element, errorClass) { $(element).addClass(errorClass) $(element.form).find("label[for='type']") .addClass("radioerror"); }, unhighlight: function(element, errorClass) { $(element).removeClass(errorClass) $(element.form).find("label[for='type']") .removeClass("radioerror"); }, errorPlacement: function(error, element) { } }); });

    Read the article

  • radio button value in php

    - by Crash893
    Im trying to make a simple survey in php I have a set of radio buttons on a page called sja.php that sends its to sjamail.php page the problem is that when i go to get $answer = $_POST['ans']; I can't seen to do anything like echo "$answer"; but if i were to throw some logic at it like if ($answer == "ans1") { echo 'Correct'; } else { echo 'Incorrect'; } IT will display correct or incorrect so why is it i can't access the value of the radio button ans?

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >