Search Results

Search found 4648 results on 186 pages for 'voting buttons'.

Page 19/186 | < Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >

  • JQuery and radio buttons

    - by ognjenb
    <form id="Numbers1" <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> <% rb=rb+1; %> </tr> <% } %> </table> <p> <input type="submit" value="Save" /> </p> </form> With this script I get some info of selected radio: <script type="text/javascript"> $(document).ready(function() { var thevalue1; var thevalue2; $("#Numbers1").submit(function() { $("input:radio:checked").each(function() { thevalue1 = $("input:radio:checked").attr('id'); thevalue2 = $("input:radio:checked").val(); alert(thevalue1 + thevalue2); }); }); }); </script> If I have more rows this alert every time prints the information of first selected radio, why???

    Read the article

  • jQuery Ajax call for buttons on a list

    - by lloydphillips
    I have a list of data that i have in a view from an asp.net mvc application. It's a list of stock and I have two images (a plus and a minus) on the end of each row which will allow me to increase or decrease stock quantity. It works fine at present with a call to the mvc action but since the list is long I want to use jQuery and AJAX to have the call go without a refresh. I want to do this with unobtrusive javascript so don't want onclick handlers on my images. Since I'm just starting out with jQuery I have no idea how I can iterate all the images and add the function. Here are the images with the form tags as they stand: <td> <% using (Html.BeginForm("Increase", "Stock", new { Id = item.StockId })) {%> <input type="image" src="/Content/Images/bullet_add.png" style="margin-left:20px;" /> <% } %> </td> <td><% using (Html.BeginForm("Decrease", "Stock", new { Id = item.StockId })) {%> <input type="image" src="/Content/Images/bullet_delete.png" style="margin-left:10px;" /><% } %> </td> Can anyone help me out a little? Many thanks. Lloyd

    Read the article

  • multiple action buttons one view on iphone

    - by alecnash
    I am trying to create a map app for iphone and I have a little problem. Every pin on the map has a different name. How can my program know which pin button is pushed so it can get the data from the server. I've created only one detailed view and I don't know how to make this work.

    Read the article

  • Mapping individual buttons on ASP.NET MVC View to controller actions

    - by skb
    I have an application where I need the user to be able to update or delete rows of data from the database. The rows are displayed to the user using a foreach loop in the .aspx file of my view. Each row will have two text fields (txtName, txtDesc), an update button, and a delete button. What I'm not sure of, is how do I have the update button send the message to the controller for which row to update? I can see a couple way of doing this: Put each row within it's own form tag, then when the update button is clicked, it will submit the values for that row only (there will also be a hidden field with the rowId) and the controller class would take all the post values as parameters to the Update method on the controller. Somehow, have the button be scripted in a way to send back only the values for that row with a POST to the controller. Is there a way of doing this? One thing I am concerned about is if each row has different names for it's controls assigned by ASP.NET (txtName1, txtDesc1, txtName2, txtDesc2), then how will their values get mapped to the correct parameters of the Controller method?

    Read the article

  • jQuery way to handle select lists, radio buttons and checkboxes

    - by Álvaro G. Vicario
    When I handle HTML form elements with jQuery, I always end up with an ugly mix of jQuery syntax and plain JavaScript like, e.g.: function doStuff($combo){ if( $combo.get(0).options[$combo.get(0).selectedIndex].value=="" ){ var txt = ""; }else{ var txt = $combo.get(0).options[$combo.get(0).selectedIndex].text; } var $description = $combo.closest("div.item").find("input[name$=\[description\]]"); $description.val(txt); } Are there standard jQuery methods to handle typical operations on elements like <select>, <input type="radio"> and <input type="checkbox">? With typical, I mean stuff like reading the value of the selected radio button in a group or replacing elements in a selection list. I haven't found them in the documentation but I admit that method overloading can make doc browser kind of tricky.

    Read the article

  • Web script to click some buttons and save some html pages

    - by Serge
    I am trying to go through a site with a bunch of links. I click on a link, save the page, click on a button, save a page. Then go back and repeat it for a huge number of links. I want to write a script to do that for me. I know C++ but I want to do Javascript for this, what is a good place to get me started? What would be a good IDE to use?

    Read the article

  • Radio Buttons not highlighting as though they are selected

    - by Ryan
    I'm working on an android activity with a RadioGroup containing 10 RadioButtons. For some reason or another sometimes, only sometimes, when you select a RadioButton in the RadioGroup it doesn't highlight as if it's selected but through some tests I've determined that it really IS selected even though it isn't highlighted. Another odd thing that occurs is that when you select any other RadioButton in the RadioGroup and then try selecting your original Radio Button (the one that wouldn't highlight as though it were selected) it does highlight and functions as normal. Any idea why this is happening or how to fix it? Thanks!

    Read the article

  • AlertDialog not showing two buttons.

    - by jfalexvijay
    Hi AlertDialog not showing send button. Below is the code. Please tell me what mistake I have made in my code. protected Dialog onCreateDialog(int id) { final AlertDialog.Builder dialog = new AlertDialog.Builder(this); dialog.setMessage("Enter Holla message"); EditText hollaMessage = new EditText(this); dialog.setView(hollaMessage); dialog.setCancelable(false); dialog.setPositiveButton("Send", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { List result = new ArrayList(); } }); dialog.setPositiveButton("Cancel", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { dismissDialog(0); } }); AlertDialog alert = dialog.create(); return alert; }

    Read the article

  • calling same function on different buttons not loaded yet

    - by Jordan Faust
    I can not get this to work for every button and I cannot find anything explaining why. I guessing it is something small that I am missing $(document).ready(function() { // delete the selected row from the database $(document).on('click', '#business-area-delete-button', { model: "BusinessArea" }, deleteRow); $(document).on('click', '#business-type-delete-button', { model: "BusinessType" }, deleteRow); $(document).on('click', '#client-delete-button', { model: "Client" }, deleteRow); $(document).on('click', '#client-type-delete-button', { model: "ClientType" }, deleteRow); $(document).on('click', '#communication-channel-type', { model: "CommunicationChannelType" }, deleteRow); $(document).on('click', '#parameter-type-delete-button', { model: "ParameterType" }, deleteRow); $(document).on('click', '#validation-method-delete-button', { model: "ValidationMethod" }, deleteRow); } the event function deleteRow(event){ $.ajax( { type:'POST', data: { id: $(".delete-row").attr("id") }, url:"/mysite/admin/delete" + event.data.model, success:function(data,textStatus){ $('#main-content').html(data); }, error:function(XMLHttpRequest,textStatus,errorThrown){ jQuery('#alerts').html(XMLHttpRequest.responseText); }, complete:function(XMLHttpRequest,textStatus){ placeAlerts() } } ); return false }; This works only for a the button with id validation-method-delete-button. I use document and not the button its self because the button is contained in a template that is loaded later via ajax. I have this working for a similar function that is selecting a row in a table however I am not attempting to pass data in that scenario.

    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

  • System-Provided Buttons in iPhone SDK

    - by sheLa
    I would like to use the playback button in iPod coverflow view. Are all the system provided icons on this page? http://developer.apple.com/iphone/library/documentation/UserExperience/Conceptual/MobileHIG/SystemProvided/SystemProvided.html or is there a more detailed list?

    Read the article

  • Two buttons in a form, Both called

    - by coffeeaddict
    Here's my ASP.NET form. When I click one button it calls both jQuery functions. It's probably a rudimentary HTML question but I'm not sure why: <form id="form1" runat="server"> <div id="testDialog"> </div> <p><input type="button" id="invoke1" value="test 1" /></p> <input type="button" id="invoke2" value="test 2" /> </form> <script type="text/javascript"> $(function() { $("input:invoke1").click(function(){ showSomething("testDialog"); }); $("input:invoke2").click(function(){ showSomething2("test.aspx", options); }); }); </script>

    Read the article

  • hover buttons background image change not working

    - by Brae
    Background I'm trying to make a menu, you hover over the button and the background image shifts its Y position to give you the 'over' effect for each button. CSS .menu {float: left;} .menu span {display: none;} .menu a {display: block; margin: 10px; width: 200px; height: 50px;} #itemA {background: url('images/btnA.png') no-repeat 0 0;} #itemB {background: url('images/btnB.png') no-repeat 0 0;} #itemC {background: url('images/btnC.png') no-repeat 0 0;} #itemD {background: url('images/btnD.png') no-repeat 0 0;} HTML <div class="menu"> <a id="itemA" href="#"><span>AAAAA</span></a> <a id="itemB" href="#"><span>BBBBB</span></a> <a id="itemC" href="#"><span>CCCCC</span></a> <a id="itemD" href="#"><span>DDDDD</span></a> </div> Problem why do none of these work? /*** - test A a.menu:link {background-position: 0 -51px;} a.menu:visited {display: block; margin: 10px; width: 200px; height: 32px;} ***/ /*** - test B a.menu:hover {background-position: 0 -51px;} ***/ /*** - test C .menu a:hover {background-position: 0 -51px;} ***/ /*** - test D .menu:hover a {background-position: 0 -51px;} ***/ /*** - test E a:hover .menu {background-position: 0 -51px;} ***/ Notes images are 200x101px (50px high with a 1px seperator) Question why do none of these work, should any of them work, is there a solution im missing? thanks in advance!

    Read the article

  • buttons and menu items in cocos2d/objective-c

    - by peter61
    In my app, I'd like a method called whenever the user taps the screen (anywhere on the screen). Normally, I'd make a transparent UIButton that covers the whole screen. If I'm using the cocos2d framework, what's the best way to do this? Is it good practice to still use UIButtons? I've been reading about MenuItems but haven't found an easy way to make one giant fully transparent menu item? Thanks.

    Read the article

  • Multiple Forms with Different Actions using Submit Buttons

    - by Adam Coulson
    I have Two forms in my index.php and am trying to get them to submit and POST their data seperatly Form 1 echo '<form action="process.php?type=news" method="post">'; echo '<table cellspacing="0"><tr><th>'; echo 'Add News to News Feed'; echo '</th></tr><tr><td>'; echo 'Title:<br /><input name="newstitle" type="text" id="add" style="height:16px;width:525px;" size="80" maxlength="186" /><br />'; echo 'Main Body Text:<br /><textarea name="newsfeed" id="add" style="width:525px;height:78px;" maxlength="2000" ></textarea>'; echo '<input style="float:right;margin-top:5px;" id="button" type="submit" value="Submit" />'; echo '</td></tr></table></from>'; And Form 2 echo '<form action="process.php?type=suggest" method="post">'; echo '<table cellspacing="0"><tr><th>'; echo 'Suggest Additions to the Intranet'; echo '</th></tr><tr><td>'; echo '<textarea name="suggest" id="add" style="width:330px;height:60px;" maxlength="800" ></textarea>'; echo '<input style="float:right;margin-top:5px;" id="button" type="submit" value="Submit" />'; echo '</td></tr></table></from>'; I want these both to post and do the action after pressing the submit button, but currently the second form submit to the first forms action How can i fix this??? EDIT: Also i am using .PHP for both the index and process page then using it to echo the forms onto the page Also here is the process.php data $type=$_REQUEST['type']; $suggest=$_POST['suggest']; $newstitle=$_POST['newstitle']; $news=mysql_real_escape_string($_POST['newsfeed']); if ($type == "news") { $sql=mysql_query("SELECT * FROM newsfeed WHERE title = ('$newstitle')"); $number_of_rows = mysql_num_rows($sql); if ($number_of_rows > 0) { echo 'This Title is Already Taken'; } else { $sql="INSERT INTO newsfeed (title, news) VALUES ('$newstitle','$news')"; if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } header('Location: index.php'); exit; } } elseif ($type == "suggest") { $sql="INSERT INTO suggestions VALUES ('$suggest')"; if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } header('Location: index.php'); exit; }

    Read the article

  • Buttons created through jquery don't respond to clicks

    - by Atrus
    As I've come to understand using $('.whatever').click() only works for items created initially. Additional items won't respond in the correct fashion. I was then directed to using something like $('.whatever).on('click', myFunction()). However, I'm not detecting any difference, as newly created items are not called. Here is a JSFiddle demonstration my example code: http://jsfiddle.net/atrus6/zaKZN/ My initial input plus 'Kill' will work in the correct fashion, however any additional 'input + kill's will not not do anything. Am I incorrectly using .on() or is it something else?

    Read the article

  • Poll for pressed buttons in Java

    - by directedition
    I have a WorldWind application build based on the Java SDK. It has a great event handler for detecting when you click on objects, but I've run into a snag. While I can click on and select individual objects, I can't determine if the user is pressing the control key while they click (if they want to select multiple objects). I can implement event handlers for both the mouse and the keyboard, but I can't for the life of me figure out how to tie the two together. How could I make my mouse listener poll the system for a list of currently depressed keys?

    Read the article

  • How do I code a green button in UIActionSheet?

    - by Joshua
    I am using the code: { randomstatus=0; msg=[[NSString alloc]initWithFormat:@"Good job, do you want to continue?"]; UIActionSheet *actionSheet=[[UIActionSheet alloc]initWithTitle:msg delegate:self cancelButtonTitle:@"No" destructiveButtonTitle:@"Yes" otherButtonTitles:nil]; [actionSheet showInView:self.view]; [actionSheet release]; [msg release]; } I don't want to change the code, but I need the "destructiveButton" to be green instead of red. Is this possible, or do i need to use a different button?

    Read the article

  • ASP.NET Dynamic Radiobutton - How to add validation

    - by Velnias
    At the moment I have something like this ` <%# Eval("orderBy").ToString()%) <%# Eval("question").ToString()% " type="radio" id="True" value="True" class="styled" / " type="radio" id="False" value="False" class="styled" / ` And in the code behind I caputure the values as Request.Form("question1") for example and this all works fine Now I am wondering how to add validation to this, I think i have to change to asp Radio Button control but i cant see how i could add my dynamic radiobutton names in there with my id from stored procedure. Also I would like to add the validation to the top of the screen as a validation summary Any Ideas ?

    Read the article

  • .NET/C#: How to remove/minimize code clutter while 'triggering' Events

    - by eibhrum
    Hi, I just wanna find out if there's a way I could minimize code clutter in my application. I have written code/s similar to this: private void btnNext_MouseEnter(object sender, System.Windows.Input.MouseEventArgs e) { btnNext.Opacity = 1; } private void btnNext_MouseLeave(object sender, System.Windows.Input.MouseEventArgs e) { btnNext.Opacity = 0.5; } private void btnShowAll_MouseEnter(object sender, System.Windows.Input.MouseEventArgs e) { btnShowAll.Opacity = 1; } private void btnShowAll_MouseLeave(object sender, System.Windows.Input.MouseEventArgs e) { btnShowAll.Opacity = 0.5; } private void btnPrev_MouseEnter(object sender, System.Windows.Input.MouseEventArgs e) { btnPrev.Opacity = 1; } private void btnPrev_MouseLeave(object sender, System.Windows.Input.MouseEventArgs e) { btnPrev.Opacity = 0.5; } private void btnSearch_MouseEnter(object sender, System.Windows.Input.MouseEventArgs e) { btnSearch.Opacity = 1; } private void btnSearch_MouseLeave(object sender, System.Windows.Input.MouseEventArgs e) { btnSearch.Opacity = 0.5; } private void btnSearchStore_MouseEnter(object sender, System.Windows.Input.MouseEventArgs e) { btnSearchStore.Opacity = 1; } private void btnSearchStore_MouseLeave(object sender, System.Windows.Input.MouseEventArgs e) { btnSearchStore.Opacity = 0.5; } private void btnCloseSearch_MouseEnter(object sender, System.Windows.Input.MouseEventArgs e) { btnCloseSearch.Opacity = 1; } private void btnCloseSearch_MouseLeave(object sender, System.Windows.Input.MouseEventArgs e) { btnCloseSearch.Opacity = 0.5; } private void btnHome_MouseEnter(object sender, System.Windows.Input.MouseEventArgs e) { btnHome.Opacity = 1; } private void btnHome_MouseLeave(object sender, System.Windows.Input.MouseEventArgs e) { btnHome.Opacity = 0.5; } and so on and so forth... Do I need to create a 'function' that will run initially? Or do I have to create another class just so I can 'organize' them? Any suggestions?

    Read the article

  • My pay pal button will not link to pay pal. It only refreshes page, why?

    - by JPJedi
    I have the following code in my registration page to go to a paypal button. But when I click on the button it just refreshes the page. Is their something I am missing? I should be able to include a paypal button on an aspx page right? <asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server"> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <asp:Panel runat="server" ID="pnlRegisterPage" CssClass="registerPage"> <table> <tr> <td><p>Plain text</p></td> <td> <form action="https://www.paypal.com/cgi-bin/webscr" method="post"> <input type="hidden" name="cmd" value="_s-xclick"> <input type="hidden" name="hosted_button_id" value="Z8TACKRHQR722"> <table> <tr><td><input type="hidden" name="on0" value="Registration Type">Registration Type</td></tr><tr><td><select name="os0"> <option value="Team">Team $80.00</option> <option value="Individual">Individual $40.00</option> </select> </td></tr> </table> <input type="hidden" name="currency_code" value="USD"> <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"> </form> </td> </tr> </table> </asp:Panel> </asp:Content> Master Page <body> <form id="form1" runat="server"> <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"> </asp:ToolkitScriptManager> <div class="masterbody"> <center> <asp:Image runat="server" ID="imgLogo" ImageUrl="" /></center> <div class="menubar"> <div class="loginview"> <asp:LoginView ID="MenuBar" runat="server"> <AnonymousTemplate> </AnonymousTemplate> <LoggedInTemplate> </LoggedInTemplate> </asp:LoginView> </div> </div> <div> <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server"> </asp:ContentPlaceHolder> </div> </div> <div class="footer"></div> </form> </body>

    Read the article

< Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >