Search Results

Search found 265 results on 11 pages for 'radiobutton'.

Page 8/11 | < Previous Page | 4 5 6 7 8 9 10 11  | Next Page >

  • Need to change layout of radio buttons! help needed

    - by James
    I've got 2 radio buttons and i want to put them next to each other. Right now theyre like Radio button 1 Radio button 2 i want to make it Radio button 1 Radio button 2 This is my code for the radio buttons, any help? <RadioGroup android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical"> <RadioButton android:id="@+id/radio_male" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Male" android:layout_below="@id/gender"/> <RadioButton android:id="@+id/radio_female" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Female" /> </RadioGroup>

    Read the article

  • Android: How to get text of dynamically created radio button selected by the user?

    - by Maxood
    How can i retrieve the text of a dynamically created radio button selected by the user? Here's my code: RadioGroup radiogroup = (RadioGroup) findViewById(R.id.rdbGp1); // layout params to use when adding each radio button LinearLayout.LayoutParams layoutParams = new RadioGroup.LayoutParams( RadioGroup.LayoutParams.WRAP_CONTENT, RadioGroup.LayoutParams.WRAP_CONTENT); for (int i = 0; i < 4; i++){ final RadioButton newRadioButton = new RadioButton(this); c3 = db.getAns(3); for (int j=0;j<i;j++) c3.moveToNext(); label = c3.getString(0); newRadioButton.setText(label); newRadioButton.setId(6); radiogroup.addView(newRadioButton, layoutParams); Waiting for the reply, Maqsood

    Read the article

  • ASP.NET Radio Button State and Back Key

    - by Dave S
    When using the browser back key on a page with radio buttons and using auto-postback, the state of the buttons (checked) stays the same while other parts of the page do not. This results in a situation where button two is checked and the cached page (because of server-side logic) displays a message that button 1 is checked. What is the best way to handle this situation? The following code example exhibits this behavior: [Form:] <asp:RadioButton ID="rb1" runat="server" AutoPostBack="true" Text="Button1" OnCheckedChanged="rb_CheckedChanged" GroupName="rbgroup" Checked="true" /> <br /> <asp:RadioButton ID="rb2" runat="server" AutoPostBack="true" Text="Button2" OnCheckedChanged="rb_CheckedChanged" GroupName="rbgroup" /> <br /> <hr /> <asp:Label ID="lbl1" runat="server">Button 1</asp:Label> [Code Behind:] protected void rb_CheckedChanged(object sender, EventArgs e) { if (rb1.Checked == true) lbl1.Text = "Button 1"; else lbl1.Text = "Button 2"; }

    Read the article

  • Programmatically adding event handler to array of radio buttons

    - by gSaenz
    Trying to add event handlers to radio buttons that are created on user input, looking at this and this as examples. However I get an error that answerOptions is not an event. Create the radio buttons Private answerOptions(n) As RadioButton ... Private Sub showQuestion(n As Integer) For i = 0 To answerOptions.Length - 1 answerOptions(i) = New RadioButton AddHandler answerOptions, AddressOf Me.Radios_Click With answerOptions(i) ' --------- SET TEXT, LOCATION ETC. End With Me.Controls.Add(answerOptions(i)) Next End Sub Planning on then handling events with Private Sub Radios_Click(sender As Object, e As EventArgs) Handles answerOptions.checked End Sub I want things to happen when the radios are checked. Don't want to use checkboxes as I want to limit one selection at a time.

    Read the article

  • How to get radio button's id and convert to string?

    - by user3461659
    I am working in Android Studio and am trying to get the ID of the selected radio button and then store the ID in a string. Is this possible? I have tried replacing the .getText() method below with .getId() but it wont let me store it as a string: RadioGroup radioGroup = (RadioGroup) findViewById(R.id.radioGroup); radioGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() { @Override public void onCheckedChanged(RadioGroup radioGroup, int checkedId) { RadioButton checkedRadioButton = (RadioButton) findViewById(checkedId); String text = checkedRadioButton.getText().toString(); Toast.makeText(getApplicationContext(), text, Toast.LENGTH_SHORT).show(); } });

    Read the article

  • Flex 4: Traversing the Stage More Easily

    - by Steve
    The following is a MXML Module I am producing in Flex 4: <?xml version="1.0" encoding="utf-8"?> <mx:Module xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" creationComplete="init()" layout="absolute" width="100%" height="100%"> <fx:Declarations> <!-- Place non-visual elements (e.g., services, value objects) here --> </fx:Declarations> <fx:Style source="BMChartModule.css" /> <s:Panel id="panel" title="Benchmark Results" height="100%" width="100%" dropShadowVisible="false"> <mx:TabNavigator id="tn" height="100%" width="100%" /> </s:Panel> <fx:Script> <![CDATA[ import flash.events.Event; import mx.charts.ColumnChart; import mx.charts.effects.SeriesInterpolate; import mx.controls.Alert; import spark.components.BorderContainer; import spark.components.Button; import spark.components.Label; import spark.components.NavigatorContent; import spark.components.RadioButton; import spark.components.TextInput; import spark.layouts.*; private var xml:XML; private function init():void { var seriesInterpolate:SeriesInterpolate = new SeriesInterpolate(); seriesInterpolate.duration = 1000; xml = parentApplication.model.xml; var sectorList:XMLList = xml.SECTOR; for each(var i:XML in sectorList) { var ncLayout:HorizontalLayout = new HorizontalLayout(); var nc:NavigatorContent = new NavigatorContent(); nc.label = i.@NAME; nc.name = "NC_" + nc.label; nc.layout = ncLayout; tn.addElement(nc); var cC:ColumnChart = new ColumnChart(); cC.percentWidth = 70; cC.name = "CC"; nc.addElement(cC); var bClayout:VerticalLayout = new VerticalLayout(); var bC:BorderContainer = new BorderContainer(); bC.percentWidth = 30; bC.layout = bClayout; nc.addElement(bC); var bClabel:Label = new Label(); bClabel.percentWidth = 100; bClabel.text = "Select a graph to view it in the column chart:"; var dpList:XMLList = sectorList.(@NAME == i.@NAME).DATAPOINT; for each(var j:XML in dpList) { var rB:RadioButton = new RadioButton(); rB.groupName = "dp"; rB.label = j.@NAME; rB.addEventListener(MouseEvent.CLICK, rBclick); bC.addElement(rB); } } } private function rBclick(e:MouseEvent):void { var selectedTab:NavigatorContent = this.tn.selectedChild as NavigatorContent; var colChart:ColumnChart = selectedTab.getChildByName("CC") as ColumnChart; trace(selectedTab.getChildAt(0)); } ]]> </fx:Script> </mx:Module> I'm writing this function rBclick to redraw the column chart when a radio button is clicked. In order to do this I need to find the column chart on the stage using actionscript. I've currently got 3 lines of code in here to do this: var selectedTab:NavigatorContent = this.tn.selectedChild as NavigatorContent; var colChart:ColumnChart = selectedTab.getChildByName("CC") as ColumnChart; trace(selectedTab.getChildAt(0)); Getting to the active tab in the tabnavigator is easy enough, but then selectedTab.getChildAt(0) - which I was expecting to be the chart - is a "spark.skin.spark.SkinnableContainerSkin"...anyway, I can continue to traverse the tree using this somewhat annoying code, but I'm hoping there is an easier way. So in short, at run time I want to, with as little code as possible, identify the column chart in the active tab so I can redraw it. Any advice would be greatly appreciated.

    Read the article

  • XAML | When used XamlReader.Parse, not able to refer the items using the LogicalTreeHelper/VisualTre

    - by Roopesh
    Hi, I am setting the dynamic xaml (I am reading the xaml from the DB) for the content of a tab using the below statement. Tab.Content = XamlReader.Parse(xaml, ctx) After setting the content, if I try getting the children using the VisualTreeHelper, but I am not able to get. How ever I dont have this issue when I construct the xaml statically. Here is the code to reading the xaml. Dim XmlDocument = New XmlDataDocument() Dim IID As String = Nothing Dim xaml As String = Nothing Dim Tab As New TabItem Dim TempPanel As XmlNode = Nothing 'Tab.Height = 0 Try XmlDocument.Load(Directory.GetCurrentDirectory & "\Xml\AppFile.xml") pXmlDoc = XmlDocument xaml = XmlDocument.SelectSingleNode("//Grid").OuterXml Dim AsmName As String = System.Reflection.Assembly.GetExecutingAssembly().GetName().Name Dim ctx As ParserContext = New ParserContext() ' New ParserContext() ctx.XamlTypeMapper = New XamlTypeMapper(New String() {AsmName}) ctx.XamlTypeMapper.AddMappingProcessingInstruction("src", "WpfToolkitDataGridTester", AsmName) ctx.XmlnsDictionary.Add("", "http://schemas.microsoft.com/winfx/2006/xaml/presentation") ctx.XmlnsDictionary.Add("x", "http://schemas.microsoft.com/winfx/2006/xaml") ctx.XmlnsDictionary.Add("src", "clr-namespace:WpfToolkitDataGridTester;assembly=" + AsmName) Tab.Name = "Tab" & Grid1Tab.Items.Count + 1 Tab.Header = "AppFile-1" Tab.BorderThickness = New Thickness(0) Tab.IsSelected = True Tab.Content = XamlReader.Parse(xaml, ctx) Grid1Tab.Items.Add(Tab) Return True Catch ex As Exception Throw End Try Here is the code to access the item after constructing the XAML. For i As Integer = 0 To VisualTreeHelper.GetChildrenCount(myVisual) - 1 Dim childVisual As Visual = CType(VisualTreeHelper.GetChild(myVisual, i), Visual) Select Case childVisual.DependencyObjectType.Name Case "ComboBox" AddHandler CType(childVisual, ComboBox).SelectionChanged, AddressOf ComboBox_SelectChanged Case "CheckBox" AddHandler CType(childVisual, CheckBox).Checked, AddressOf CheckBoxClicked AddHandler CType(childVisual, CheckBox).Unchecked, AddressOf CheckBoxClicked Case "RadioButton" AddHandler CType(childVisual, RadioButton).Checked, AddressOf CheckBoxClicked Case "TabControl" For Each item As System.Windows.Controls.TabItem In CType(childVisual, TabControl).Items EnumVisual(item.Content) Next End Select EnumVisual(childVisual) Next i any help is highly appreciated. Thanks,

    Read the article

  • C# Gui setting control.Enabled to false fires OnClick event???

    - by Daniel
    For some really weird reason when i set the .Enabled property to false on a simple text box on a small GUI, it fires a radio buttons OnClick event and its causing lots of problems. I have breakpointed the txtBox.Enabled = false; and after stepping over OR into it i jump straight to the OnClick event of the radio button control Here is the call stack as that happened: TestGUI.exe!TestGUI.frmMain.radiobuttonClicked(object sender = {Text = "Download Single Episode" Checked = true}, System.EventArgs e = {System.EventArgs}) Line 67 C# System.Windows.Forms.dll!System.Windows.Forms.Control.OnClick(System.EventArgs e) + 0x70 bytes System.Windows.Forms.dll!System.Windows.Forms.RadioButton.OnClick(System.EventArgs e) + 0x27 bytes System.Windows.Forms.dll!System.Windows.Forms.RadioButton.OnEnter(System.EventArgs e = {System.EventArgs}) + 0x3e bytes System.Windows.Forms.dll!System.Windows.Forms.Control.NotifyEnter() + 0x20 bytes System.Windows.Forms.dll!System.Windows.Forms.ContainerControl.UpdateFocusedControl() + 0x195 bytes System.Windows.Forms.dll!System.Windows.Forms.ContainerControl.AssignActiveControlInternal(System.Windows.Forms.Control value = {Text = "Download Single Episode" Checked = true}) + 0x54 bytes System.Windows.Forms.dll!System.Windows.Forms.ContainerControl.ActivateControlInternal(System.Windows.Forms.Control control, bool originator = false) + 0x76 bytes System.Windows.Forms.dll!System.Windows.Forms.ContainerControl.SetActiveControlInternal(System.Windows.Forms.Control value = {Text = "Download Single Episode" Checked = true}) + 0x73 bytes System.Windows.Forms.dll!System.Windows.Forms.ContainerControl.SetActiveControl(System.Windows.Forms.Control ctl) + 0x33 bytes System.Windows.Forms.dll!System.Windows.Forms.ContainerControl.ActiveControl.set(System.Windows.Forms.Control value) + 0x5 bytes System.Windows.Forms.dll!System.Windows.Forms.Control.Select(bool directed, bool forward) + 0x1b bytes System.Windows.Forms.dll!System.Windows.Forms.Control.SelectNextControl(System.Windows.Forms.Control ctl, bool forward, bool tabStopOnly, bool nested, bool wrap) + 0x7b bytes System.Windows.Forms.dll!System.Windows.Forms.Control.SelectNextControlInternal(System.Windows.Forms.Control ctl, bool forward, bool tabStopOnly, bool nested, bool wrap) + 0x4a bytes System.Windows.Forms.dll!System.Windows.Forms.Control.SelectNextIfFocused() + 0x61 bytes System.Windows.Forms.dll!System.Windows.Forms.Control.Enabled.set(bool value) + 0x42 bytes What the hell? It wouldn't have anything to do with the way i subscribe to the events would it? this.radioBtnMultipleDownload.Click += radiobuttonClicked; this.radioBtnSingleDownload.Click += radiobuttonClicked; this.radioCustomUrl.Click += radiobuttonClicked;

    Read the article

  • Get error when accessing RadioButtonList from javascript that exist in a page that have master page

    - by Space Cracker
    i have a asp.net page that have its master page and it contain RadioButtonList1 and i try to do thefollwing <script type="text/javascript"> var radioButtonList = document.getElementById('<%=RadioButtonList1.ClientID%>'); if(radioButtonList[0].checked) document.getElementById("_secondTR").style.display = "block"; else if (radioButtonList[1].checked ) document.getElementById("_secondTR").style.display = "none"; } </script> <table style="width: 100%"> <tr id="Tr1"> <td> <asp:RadioButtonList ID="RadioButtonList1" runat="server" BackColor="#FFCC99" RepeatDirection="Horizontal" Width="117px" onclick="ShowHide()"> <asp:ListItem Value="1">Yes</asp:ListItem> <asp:ListItem Value="0">No</asp:ListItem> </asp:RadioButtonList> </td> </tr> <tr id="_secondTR" runat="server" style="display: none"> <td> <asp:RadioButton ID="Five" runat="server" GroupName="1" BackColor="#669999" /> <asp:RadioButton ID="Four" runat="server" GroupName="1" CausesValidation="True" BackColor="#669999" /> </td> </tr> </table> i can't get RadioButtonList1 from java script ... could any help me to get that ?

    Read the article

  • Arrow keys and changing control's focus hang the application

    - by sthay
    I have a usercontrol that contains a FlowLayoutPanel (topdown flow) with a bunch of radiobuttons. The control exposes a CheckedChanged event that fires whenever one of the radiobuttons's check changed. My form contains the usercontrol and a textbox. I subscribe the usercontrol's CheckedChanged event and depending on which radiobutton gets checked, I either disable the textbox or put a focus inside the textbox. All this works fine with mouseclick when changing the radiobutton's check state. However, this will hang indefinitely when using the arrow keys. I don't understand why the difference. The following are steps to reproduce the behavior I'm seeing: Create a usercontrol and drop a FlowLayoutPanel control and set its FlowDirection = TopDown. Then add two radiobuttons to the FlowLayoutPanel. Provide an event handler in the usercontrol public event EventHandler CheckedChanged { add { radioButton2.CheckedChanged += value; } remove { radioButton2.CheckedChanged -= value; } } Create a windows form and drop the above user control. Add a textbox and set Enabled to False. Subscribe to the usercontrol's CheckedChanged event as follows private void userControl11_CheckedChanged(object sender, EventArgs e) { textBox1.Select(); } Run. Notice that if you use the mouse to click between the radiobuttons, thing works fine; but it will crash if you use the up/down arrow keys.

    Read the article

  • .change(function) can control two command

    - by klox
    dear all..i've a textfield, it using barcode scanner for input data..after scan it shows KD-R411ED 105X0001... I'm successful separate them into two text field use ".change(function)" $("#tags1").change(function() { var barcode; barCode=$("#tags1").val(); var data=barCode.split(" "); $("#tags1").val(data[0]); $("#tags2").val(data[1]); }); what i want is beside make them separate after ".change(function)" another script can read two character behind "KD-R411ED"..that is "ED"..this character can make a radiobutton which id="check1" are checked.. what's code which can combine with code above? this my complete code.. $("#tags1").change(function() { var barcode; barCode=$("#tags1").val(); var data=barCode.split(" "); $("#tags1").val(data[0]); $("#tags2").val(data[1]); var code = data[0].substr(data[0].length - 2); // suggested by Jan Willem B if (code =='UD') $('#check1').attr('checked','checked'); } else { if (code == 'ED') { $('#check2').attr('checked','checked'); } } and this the form <input id="check1" type="radio" class="check" name="check" onclick="addtext()" value="U" />U <input id="check2" type="radio" class="check" name="check" onclick="addtext_1()" value="E" />E the radiobutton still not response

    Read the article

  • Get a selected radio button value after POST to set other fields enabled/disabled

    - by Redeemed1
    I have an MVC application with a simple control to all selection of All Dates or selecting a Date Range. The radio buttons have an onclick handler to enable/disable the dat pickers. All work well so far. When I try to set the correct context state for the datepickers after doing a POST I cannot get the jQuery selector to return the radio buttons checked value. The code is as follows: <%= Html.RadioButton("DateSelection.AllDates", "AllDates", Model.AllDates == "AllDates", new { onclick = "setReadOnly(this);" })%>ALL Dates&nbsp; <%= Html.RadioButton("DateSelection.AllDates", "Selection", Model.AllDates == "Selection", new { onclick = "setReadOnly(this);" })%>Selection <%= Html.DatePicker("DateSelection.startdate", Model.StartDate, "", "") %> &nbsp;To&nbsp;<%= Html.DatePicker("DateSelection.enddate", Model.EndDate, "", "") %><br /> The javascript is as follows: <script type="text/jscript" > function setReadOnly(obj) { if (obj.value == "Selection") { $('#DateSelection_startdate').css('backgroundColor', '#ffffff') .removeAttr('readonly') .datepicker('enable'); $('#DateSelection_enddate').css('backgroundColor', '#ffffff') .removeAttr('readonly') .datepicker('enable'); } else { $('#DateSelection_startdate').css('backgroundColor', '#eeeeee') .attr('readonly', 'readonly') .val('') .datepicker('disable'); $('#DateSelection_enddate').css('backgroundColor', '#eeeeee') .attr('readonly', 'readonly') .val('') .datepicker('disable'); } } <script type="text/jscript"> $(document).ready(function() { $('#DateSelection_startdate').datepicker('disable').css('backgroundColor', '#eeeeee') .attr('readonly', 'readonly') .val(''); $('#DateSelection_enddate').datepicker('disable').css('backgroundColor', '#eeeeee') .attr('readonly', 'readonly') .val(''); var selected = $('#DateSelection_AllDates:checked'); setReadOnly(selected); }); The javascript line that is causing the problem is var selected = $('#DateSelection_AllDates:checked'); which will NOT return the checked radio button. Using var selected = $('#DateSelection_AllDates'); will return the first radio button value as expected i.e. applying the ':checked' filter ALWAYS returns undefined. Can anyone see anything wrong here?

    Read the article

  • Checking if radio buttons are checked in Firefox

    - by Andrew Song
    On my site, I have two checkboxes created in my ASP.NET MVC view like so: Html.RadioButton("check", "true", "true" == (string) ViewData["someKey"], new { id = "check1"}); Html.RadioButton("check", "false", "false" == (string) ViewData["someKey"], new { id = "check2"}); I am positive that ViewData["someKey"] has the value "true" in it. In my JS init function, I perform the following check: alert($('#check1').is(':checked') + " " + $('#check2').is(':checked')); In Firefox (and only Firefox), my alert dialog will show the following (it works as expected in every other browser): Initial page load: true false Normal refresh via Ctrl + R: false false Refresh skipping cache via Ctrl + Shift + R: true false I have tried many different methods of looking at the checkbox value, including $('#check1').attr('checked') without success. If I examine the HTML in Firebug, I can see that the first radio button has the property checked="checked" in it. Why is the checkbox value changing in FF when I refresh, and how can I mitigate this? Since this seems to be a FF-only bug, how can I change my code to make it work? This SO question seemed to ask something similar, but none of the proposed solutions seem to work in this case. Edit: I should also point out that when the radio button is rendered after the refresh in FF, it's not actually being displayed as checked either, despite what the HTML is telling me. Edit2: Adding raw HTML as per request <input id="check1" type="radio" value="True" name="check" checked="checked"/> <input id="check2" type="radio" value="False" name="check"/>

    Read the article

  • Developed android application cannot connect to phpmyadmin

    - by user1850936
    I am developing an app with eclipse. I tried to store the data that key in by user into database in phpmyadmin. Unfortunately, after the user has clicked on submit button, there is no response and data is not stored in my database. Here is my java file: import java.util.ArrayList; import java.util.List; import org.apache.http.NameValuePair; import org.apache.http.message.BasicNameValuePair; import org.json.JSONObject; import android.app.Activity; import android.app.AlertDialog; import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.RadioButton; import android.content.res.Configuration; public class UserRegister extends Activity { JSONParser jsonParser = new JSONParser(); EditText inputName; EditText inputUsername; EditText inputEmail; EditText inputPassword; RadioButton button1; RadioButton button2; Button button3; int success = 0; private static String url_register_user = "http://10.20.92.81/database/add_user.php"; private static final String TAG_SUCCESS = "success"; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_user_register); inputName = (EditText) findViewById(R.id.nameTextBox); inputUsername = (EditText) findViewById(R.id.usernameTextBox); inputEmail = (EditText) findViewById(R.id.emailTextBox); inputPassword = (EditText) findViewById(R.id.pwTextBox); Button button3 = (Button) findViewById(R.id.regSubmitButton); button3.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { String name = inputName.getText().toString(); String username = inputUsername.getText().toString(); String email = inputEmail.getText().toString(); String password = inputPassword.getText().toString(); if (name.contentEquals("")||username.contentEquals("")||email.contentEquals("")||password.contentEquals("")) { AlertDialog.Builder builder = new AlertDialog.Builder(UserRegister.this); builder.setMessage(R.string.nullAlert) .setTitle(R.string.alertTitle); builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { } }); AlertDialog dialog = builder.show(); } // creating new product in background thread RegisterNewUser(); } }); } public void RegisterNewUser() { try { String name = inputName.getText().toString(); String username = inputUsername.getText().toString(); String email = inputEmail.getText().toString(); String password = inputPassword.getText().toString(); // Building Parameters List<NameValuePair> params = new ArrayList<NameValuePair>(); params.add(new BasicNameValuePair("name", name)); params.add(new BasicNameValuePair("username", username)); params.add(new BasicNameValuePair("email", email)); params.add(new BasicNameValuePair("password", password)); // getting JSON Object // Note that create product url accepts POST method JSONObject json = jsonParser.makeHttpRequest(url_register_user, "GET", params); // check log cat for response Log.d("Send Notification", json.toString()); success = json.getInt(TAG_SUCCESS); if (success == 1) { // successfully created product Intent i = new Intent(getApplicationContext(), StudentLogin.class); startActivity(i); finish(); } else { // failed to register } } catch (Exception e) { e.printStackTrace(); } } @Override public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); } } my php file: <?php $response = array(); require_once __DIR__ . '/db_connect.php'; $db = new DB_CONNECT(); if (isset($_GET['name']) && isset($_GET['username']) && isset($_GET['email']) && isset($_GET['password'])) { $name = $_GET['name']; $username = $_GET['username']; $email = $_GET['email']; $password = $_GET['password']; // mysql inserting a new row $result = mysql_query("INSERT INTO register(name, username, email, password) VALUES('$name', '$username', '$email', '$password')"); // check if row inserted or not if ($result) { // successfully inserted into database $response["success"] = 1; $response["message"] = "You are successfully registered to MEMS."; // echoing JSON response echo json_encode($response); } else { // failed to insert row $response["success"] = 0; $response["message"] = "Oops! An error occurred."; // echoing JSON response echo json_encode($response); } } else { // required field is missing $response["success"] = 0; $response["message"] = "Required field(s) is missing"; // echoing JSON response echo json_encode($response); } ?> the log cat is as follows: 11-25 10:37:46.772: I/Choreographer(638): Skipped 30 frames! The application may be doing too much work on its main thread.

    Read the article

  • I can''t figure out how to use the comboBox to remove radiobuttons

    - by user3576336
    import java.awt.EventQueue; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.border.EmptyBorder; import javax.swing.ButtonGroup; import javax.swing.JLabel; import javax.swing.JDesktopPane; import javax.swing.JRadioButton; import javax.swing.JComboBox; import java.awt.GridBagLayout; import java.awt.GridBagConstraints; import java.awt.Insets; import java.awt.Color; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; @SuppressWarnings("serial") public class Calendar1 extends JFrame implements ActionListener { private JPanel contentPane; String[] Months = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" }; JDesktopPane desktopPane; ButtonGroup bG = new ButtonGroup(); JRadioButton radioButton, rdbtnNewRadioButton, radioButton_1, radioButton_2, radioButton_3, radioButton_4, radioButton_5, radioButton_6, radioButton_7, radioButton_8, radioButton_9, radioButton_10, radioButton_11, radioButton_12, radioButton_13, radioButton_14, radioButton_15, radioButton_16, radioButton_17, radioButton_18, radioButton_19, radioButton_20, radioButton_21, radioButton_22, radioButton_23, radioButton_24, radioButton_25, radioButton_26, radioButton_27, radioButton_28, radioButton_29; /** * Launch the application. */ public static void main(String[] args) { EventQueue.invokeLater(new Runnable() { public void run() { try { Calendar1 frame = new Calendar1(); frame.setVisible(true); } catch (Exception e) { e.printStackTrace(); } } }); } /** * Create the frame. */ @SuppressWarnings("unchecked") public Calendar1() { setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setBounds(100, 100, 521, 300); contentPane = new JPanel(); contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); setContentPane(contentPane); contentPane.setLayout(null); JComboBox comboBox = new JComboBox(Months); comboBox.setBounds(28, 16, 132, 27); contentPane.add(comboBox); comboBox.setSelectedIndex(0); comboBox.addActionListener(this); JLabel label = new JLabel("2014"); label.setBounds(350, 20, 61, 16); contentPane.add(label); desktopPane = new JDesktopPane(); desktopPane.setBackground(new Color(30, 144, 255)); desktopPane.setBounds(0, 63, 495, 188); contentPane.add(desktopPane); GridBagLayout gbl_desktopPane = new GridBagLayout(); gbl_desktopPane.columnWidths = new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; gbl_desktopPane.rowHeights = new int[] { 0, 0, 0, 0, 0, 0, 0, 0 }; gbl_desktopPane.columnWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE }; gbl_desktopPane.rowWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE }; desktopPane.setLayout(gbl_desktopPane); // JLabel lblSun = new JLabel("Sun"); // lblSun.setForeground(Color.RED); // // GridBagConstraints gbc_lblSun = new GridBagConstraints(); // gbc_lblSun.insets = new Insets(0, 0, 5, 5); // gbc_lblSun.gridx = 2; // gbc_lblSun.gridy = 0; // desktopPane.add(lblSun, gbc_lblSun); // // JLabel lblMon = new JLabel("Mon"); // GridBagConstraints gbc_lblMon = new GridBagConstraints(); // gbc_lblMon.insets = new Insets(0, 0, 5, 5); // gbc_lblMon.gridx = 4; // gbc_lblMon.gridy = 0; // desktopPane.add(lblMon, gbc_lblMon); // // JLabel lblTues = new JLabel("Tues"); // GridBagConstraints gbc_lblTues = new GridBagConstraints(); // gbc_lblTues.insets = new Insets(0, 0, 5, 5); // gbc_lblTues.gridx = 6; // gbc_lblTues.gridy = 0; // desktopPane.add(lblTues, gbc_lblTues); // // JLabel lblWed = new JLabel("Wed"); // GridBagConstraints gbc_lblWed = new GridBagConstraints(); // gbc_lblWed.insets = new Insets(0, 0, 5, 5); // gbc_lblWed.gridx = 8; // gbc_lblWed.gridy = 0; // desktopPane.add(lblWed, gbc_lblWed); // // JLabel lblThurs = new JLabel("Thurs"); // GridBagConstraints gbc_lblThurs = new GridBagConstraints(); // gbc_lblThurs.insets = new Insets(0, 0, 5, 5); // gbc_lblThurs.gridx = 10; // gbc_lblThurs.gridy = 0; // desktopPane.add(lblThurs, gbc_lblThurs); // // JLabel lblFri = new JLabel("Friday"); // GridBagConstraints gbc_lblFri = new GridBagConstraints(); // gbc_lblFri.insets = new Insets(0, 0, 5, 5); // gbc_lblFri.gridx = 12; // gbc_lblFri.gridy = 0; // desktopPane.add(lblFri, gbc_lblFri); // // JLabel lblSat = new JLabel("Sat"); // lblSat.setForeground(Color.RED); // GridBagConstraints gbc_lblSat = new GridBagConstraints(); // gbc_lblSat.insets = new Insets(0, 0, 5, 5); // gbc_lblSat.gridx = 14; // gbc_lblSat.gridy = 0; // desktopPane.add(lblSat, gbc_lblSat); radioButton = new JRadioButton("1"); GridBagConstraints gbc_radioButton = new GridBagConstraints(); gbc_radioButton.insets = new Insets(0, 0, 5, 5); gbc_radioButton.gridx = 8; gbc_radioButton.gridy = 1; desktopPane.add(radioButton, gbc_radioButton); bG.add(radioButton); rdbtnNewRadioButton = new JRadioButton("2"); GridBagConstraints gbc_rdbtnNewRadioButton = new GridBagConstraints(); gbc_rdbtnNewRadioButton.insets = new Insets(0, 0, 5, 5); gbc_rdbtnNewRadioButton.gridx = 10; gbc_rdbtnNewRadioButton.gridy = 1; desktopPane.add(rdbtnNewRadioButton, gbc_rdbtnNewRadioButton); bG.add(rdbtnNewRadioButton); radioButton_1 = new JRadioButton("3"); GridBagConstraints gbc_radioButton_1 = new GridBagConstraints(); gbc_radioButton_1.insets = new Insets(0, 0, 5, 5); gbc_radioButton_1.gridx = 12; gbc_radioButton_1.gridy = 1; desktopPane.add(radioButton_1, gbc_radioButton_1); bG.add(radioButton_1); radioButton_2 = new JRadioButton("4"); GridBagConstraints gbc_radioButton_2 = new GridBagConstraints(); gbc_radioButton_2.insets = new Insets(0, 0, 5, 5); gbc_radioButton_2.gridx = 14; gbc_radioButton_2.gridy = 1; desktopPane.add(radioButton_2, gbc_radioButton_2); bG.add(radioButton_2); radioButton_3 = new JRadioButton("5"); GridBagConstraints gbc_radioButton_3 = new GridBagConstraints(); gbc_radioButton_3.insets = new Insets(0, 0, 5, 5); gbc_radioButton_3.gridx = 2; gbc_radioButton_3.gridy = 2; desktopPane.add(radioButton_3, gbc_radioButton_3); bG.add(radioButton_3); radioButton_4 = new JRadioButton("6"); GridBagConstraints gbc_radioButton_4 = new GridBagConstraints(); gbc_radioButton_4.insets = new Insets(0, 0, 5, 5); gbc_radioButton_4.gridx = 4; gbc_radioButton_4.gridy = 2; desktopPane.add(radioButton_4, gbc_radioButton_4); bG.add(radioButton_4); radioButton_5 = new JRadioButton("7"); GridBagConstraints gbc_radioButton_5 = new GridBagConstraints(); gbc_radioButton_5.insets = new Insets(0, 0, 5, 5); gbc_radioButton_5.gridx = 6; gbc_radioButton_5.gridy = 2; desktopPane.add(radioButton_5, gbc_radioButton_5); bG.add(radioButton_5); radioButton_6 = new JRadioButton("8"); GridBagConstraints gbc_radioButton_6 = new GridBagConstraints(); gbc_radioButton_6.insets = new Insets(0, 0, 5, 5); gbc_radioButton_6.gridx = 8; gbc_radioButton_6.gridy = 2; desktopPane.add(radioButton_6, gbc_radioButton_6); bG.add(radioButton_6); radioButton_7 = new JRadioButton("9"); GridBagConstraints gbc_radioButton_7 = new GridBagConstraints(); gbc_radioButton_7.insets = new Insets(0, 0, 5, 5); gbc_radioButton_7.gridx = 10; gbc_radioButton_7.gridy = 2; desktopPane.add(radioButton_7, gbc_radioButton_7); bG.add(radioButton_7); radioButton_8 = new JRadioButton("10"); GridBagConstraints gbc_radioButton_8 = new GridBagConstraints(); gbc_radioButton_8.insets = new Insets(0, 0, 5, 5); gbc_radioButton_8.gridx = 12; gbc_radioButton_8.gridy = 2; desktopPane.add(radioButton_8, gbc_radioButton_8); bG.add(radioButton_8); radioButton_9 = new JRadioButton("11"); GridBagConstraints gbc_radioButton_9 = new GridBagConstraints(); gbc_radioButton_9.insets = new Insets(0, 0, 5, 5); gbc_radioButton_9.gridx = 14; gbc_radioButton_9.gridy = 2; desktopPane.add(radioButton_9, gbc_radioButton_9); bG.add(radioButton_9); radioButton_10 = new JRadioButton("12"); GridBagConstraints gbc_radioButton_10 = new GridBagConstraints(); gbc_radioButton_10.insets = new Insets(0, 0, 5, 5); gbc_radioButton_10.gridx = 2; gbc_radioButton_10.gridy = 3; desktopPane.add(radioButton_10, gbc_radioButton_10); bG.add(radioButton_10); radioButton_11 = new JRadioButton("13"); GridBagConstraints gbc_radioButton_11 = new GridBagConstraints(); gbc_radioButton_11.insets = new Insets(0, 0, 5, 5); gbc_radioButton_11.gridx = 4; gbc_radioButton_11.gridy = 3; desktopPane.add(radioButton_11, gbc_radioButton_11); bG.add(radioButton_11); radioButton_12 = new JRadioButton("14"); GridBagConstraints gbc_radioButton_12 = new GridBagConstraints(); gbc_radioButton_12.insets = new Insets(0, 0, 5, 5); gbc_radioButton_12.gridx = 6; gbc_radioButton_12.gridy = 3; desktopPane.add(radioButton_12, gbc_radioButton_12); bG.add(radioButton_12); radioButton_13 = new JRadioButton("15"); GridBagConstraints gbc_radioButton_13 = new GridBagConstraints(); gbc_radioButton_13.insets = new Insets(0, 0, 5, 5); gbc_radioButton_13.gridx = 8; gbc_radioButton_13.gridy = 3; desktopPane.add(radioButton_13, gbc_radioButton_13); bG.add(radioButton_13); radioButton_14 = new JRadioButton("16"); GridBagConstraints gbc_radioButton_14 = new GridBagConstraints(); gbc_radioButton_14.insets = new Insets(0, 0, 5, 5); gbc_radioButton_14.gridx = 10; gbc_radioButton_14.gridy = 3; desktopPane.add(radioButton_14, gbc_radioButton_14); bG.add(radioButton_14); radioButton_15 = new JRadioButton("17"); GridBagConstraints gbc_radioButton_15 = new GridBagConstraints(); gbc_radioButton_15.insets = new Insets(0, 0, 5, 5); gbc_radioButton_15.gridx = 12; gbc_radioButton_15.gridy = 3; desktopPane.add(radioButton_15, gbc_radioButton_15); bG.add(radioButton_15); radioButton_16 = new JRadioButton("18"); GridBagConstraints gbc_radioButton_16 = new GridBagConstraints(); gbc_radioButton_16.insets = new Insets(0, 0, 5, 5); gbc_radioButton_16.gridx = 14; gbc_radioButton_16.gridy = 3; desktopPane.add(radioButton_16, gbc_radioButton_16); bG.add(radioButton_16); radioButton_17 = new JRadioButton("19"); GridBagConstraints gbc_radioButton_17 = new GridBagConstraints(); gbc_radioButton_17.insets = new Insets(0, 0, 5, 5); gbc_radioButton_17.gridx = 2; gbc_radioButton_17.gridy = 4; desktopPane.add(radioButton_17, gbc_radioButton_17); bG.add(radioButton_17); radioButton_18 = new JRadioButton("20"); GridBagConstraints gbc_radioButton_18 = new GridBagConstraints(); gbc_radioButton_18.insets = new Insets(0, 0, 5, 5); gbc_radioButton_18.gridx = 4; gbc_radioButton_18.gridy = 4; desktopPane.add(radioButton_18, gbc_radioButton_18); bG.add(radioButton_18); radioButton_19 = new JRadioButton("21"); GridBagConstraints gbc_radioButton_19 = new GridBagConstraints(); gbc_radioButton_19.insets = new Insets(0, 0, 5, 5); gbc_radioButton_19.gridx = 6; gbc_radioButton_19.gridy = 4; desktopPane.add(radioButton_19, gbc_radioButton_19); bG.add(radioButton_19); radioButton_20 = new JRadioButton("22"); GridBagConstraints gbc_radioButton_20 = new GridBagConstraints(); gbc_radioButton_20.insets = new Insets(0, 0, 5, 5); gbc_radioButton_20.gridx = 8; gbc_radioButton_20.gridy = 4; desktopPane.add(radioButton_20, gbc_radioButton_20); bG.add(radioButton_20); radioButton_21 = new JRadioButton("23"); GridBagConstraints gbc_radioButton_21 = new GridBagConstraints(); gbc_radioButton_21.insets = new Insets(0, 0, 5, 5); gbc_radioButton_21.gridx = 10; gbc_radioButton_21.gridy = 4; desktopPane.add(radioButton_21, gbc_radioButton_21); bG.add(radioButton_21); radioButton_22 = new JRadioButton("24"); GridBagConstraints gbc_radioButton_22 = new GridBagConstraints(); gbc_radioButton_22.insets = new Insets(0, 0, 5, 5); gbc_radioButton_22.gridx = 12; gbc_radioButton_22.gridy = 4; desktopPane.add(radioButton_22, gbc_radioButton_22); bG.add(radioButton_22); radioButton_23 = new JRadioButton("25"); GridBagConstraints gbc_radioButton_23 = new GridBagConstraints(); gbc_radioButton_23.insets = new Insets(0, 0, 5, 5); gbc_radioButton_23.gridx = 14; gbc_radioButton_23.gridy = 4; desktopPane.add(radioButton_23, gbc_radioButton_23); bG.add(radioButton_23); radioButton_24 = new JRadioButton("26"); GridBagConstraints gbc_radioButton_24 = new GridBagConstraints(); gbc_radioButton_24.insets = new Insets(0, 0, 5, 5); gbc_radioButton_24.gridx = 2; gbc_radioButton_24.gridy = 5; desktopPane.add(radioButton_24, gbc_radioButton_24); bG.add(radioButton_24); radioButton_25 = new JRadioButton("27"); GridBagConstraints gbc_radioButton_25 = new GridBagConstraints(); gbc_radioButton_25.insets = new Insets(0, 0, 5, 5); gbc_radioButton_25.gridx = 4; gbc_radioButton_25.gridy = 5; desktopPane.add(radioButton_25, gbc_radioButton_25); bG.add(radioButton_25); radioButton_26 = new JRadioButton("28"); GridBagConstraints gbc_radioButton_26 = new GridBagConstraints(); gbc_radioButton_26.insets = new Insets(0, 0, 5, 5); gbc_radioButton_26.gridx = 6; gbc_radioButton_26.gridy = 5; desktopPane.add(radioButton_26, gbc_radioButton_26); bG.add(radioButton_26); radioButton_27 = new JRadioButton("29"); GridBagConstraints gbc_radioButton_27 = new GridBagConstraints(); gbc_radioButton_27.insets = new Insets(0, 0, 5, 5); gbc_radioButton_27.gridx = 8; gbc_radioButton_27.gridy = 5; desktopPane.add(radioButton_27, gbc_radioButton_27); bG.add(radioButton_27); radioButton_28 = new JRadioButton("30"); GridBagConstraints gbc_radioButton_28 = new GridBagConstraints(); gbc_radioButton_28.insets = new Insets(0, 0, 5, 5); gbc_radioButton_28.gridx = 10; gbc_radioButton_28.gridy = 5; desktopPane.add(radioButton_28, gbc_radioButton_28); bG.add(radioButton_28); radioButton_29 = new JRadioButton("31"); GridBagConstraints gbc_radioButton_29 = new GridBagConstraints(); gbc_radioButton_29.insets = new Insets(0, 0, 5, 5); gbc_radioButton_29.gridx = 12; gbc_radioButton_29.gridy = 5; desktopPane.add(radioButton_29, gbc_radioButton_29); bG.add(radioButton_29); } @Override public void actionPerformed(ActionEvent e) { JComboBox cb = (JComboBox) e.getSource(); String months = (String) cb.getSelectedItem(); if (months.equals("February")) { desktopPane.remove(radioButton_28); desktopPane.revalidate(); } } } I'm trying to use the combobox to remove radiobuttons in the actionperformed, but when I run the program, nothing happens, nor can I enable new buttons in the actionperformed. Thank you so much in advance for helping me out.

    Read the article

  • Java code critique request [closed]

    - by davidk01
    Can you make sense of the following bit of java code and do you have any suggestions for improving it? Instead of writing four almost identical setOnClickListener method calls I opted to iterate over an array but I'm wondering if this was the best way to do it. Here's the code: /* Set up the radio button click listeners so two categories are not selected at the same time. When one of them is clicked it clears the others. */ final RadioButton[] buttons = {radio_books,radio_games,radio_dvds,radio_electronics}; for (int i = 0; i < 4; i++) { final int k = i; buttons[i].setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { for (int j = 0; j < 4; j++) { if (buttons[j] != buttons[k]) { buttons[j].setChecked(false); } } } }); }

    Read the article

  • Django RadioButtons with icons and not label?

    - by Asinox
    Hi guy's , i have an app that have 2 fields: company_name and logo, i'm displaying the companies like radiobutton in my Form from Model, but i want to show the logo company instead of the company label (company name) Any idea ? My forms: class RecargaForm(ModelForm): compania = forms.ModelChoiceField(queryset=Compania.objects.all(), initial=0 ,empty_label='None', widget=forms.RadioSelect()) class Meta: model = Recarga Thanks :)

    Read the article

  • SELECT SQL statement problem when getting info from an accdb in VB.Net

    - by Shane Fagan
    Hi again all, im getting the error below for this SQL statement in VB.Net SQLString = "SELECT AllPropertyDetails.PropertyID, Street, Town, County, Acres, Quotas, ResidenceDetails, Status, HighestBid, AskingPrice FROM AllPropertyDetails " SQLString += "INNER JOIN Land ON AllPropertyDetails.PropertyID = Land.PropertyID " SQLString += "WHERE Deleted = False " If PriceRadioButton.Checked = True Then SQLString += "ORDER BY AskingPrice ASC" ElseIf AcresRadioButton.Checked = True Then SQLString += "ORDER BY Acres ASC" End If Any ideas why its not working? The fields in the DB and the table names seem ok but its not working :/ System.InvalidOperationException was unhandled Message="An error occurred creating the form. See Exception.InnerException for details. The error is: No value given for one or more required parameters." Source="AuctioneerProject" StackTrace: at AuctioneerProject.My.MyProject.MyForms.Create__Instance__[T](T Instance) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 190 at AuctioneerProject.My.MyProject.MyForms.get_LandReport() at AuctioneerProject.ReportsMenu.LandButton_Click(Object sender, EventArgs e) in C:\Users\admin\Desktop\Auctioneers\AuctioneerProject\AuctioneerProject\ReportsMenu.vb:line 4 at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData) at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.Run(ApplicationContext context) at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun() at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel() at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine) at AuctioneerProject.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81 at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() InnerException: System.Data.OleDb.OleDbException ErrorCode=-2147217904 Message="No value given for one or more required parameters." Source="Microsoft Office Access Database Engine" StackTrace: at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr) at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) at System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior) at System.Data.OleDb.OleDbCommand.ExecuteReader() at AuctioneerProject.LandReport.load_Land() in C:\Users\admin\Desktop\Auctioneers\AuctioneerProject\AuctioneerProject\LandReport.vb:line 37 at AuctioneerProject.LandReport.PriceRadioButton_CheckedChanged(Object sender, EventArgs e) in C:\Users\admin\Desktop\Auctioneers\AuctioneerProject\AuctioneerProject\LandReport.vb:line 79 at System.Windows.Forms.RadioButton.OnCheckedChanged(EventArgs e) at System.Windows.Forms.RadioButton.set_Checked(Boolean value) at AuctioneerProject.LandReport.InitializeComponent() in C:\Users\admin\Desktop\Auctioneers\AuctioneerProject\AuctioneerProject\LandReport.designer.vb:line 40 at AuctioneerProject.LandReport..ctor() in C:\Users\admin\Desktop\Auctioneers\AuctioneerProject\AuctioneerProject\LandReport.vb:line 5 InnerException:

    Read the article

  • [NSIS] Custom radio-buttom INI page via Eclipse

    - by Omegazero
    I'm using Eclipse's create InstallOptions menu to create a custom INI page with radio-buttons for repackaging the Blackberry Desktop installer. There are 2 sections for each type: "Internet" and "Enterprise". I need a user to select 1 of the 2 options and depending on their selection, the page will carry over the selection chosen in the custom page, jump to the INSTFILES page, and continue onto the end. I couldn't find any concrete documentation on getting INI pages to load in the script (I'm probably searching incorrectly), and then pass data from one page to the next (according to fields I guess?) Any help is appreciated. Even if it's to tell me I'm blind and can't read a doc (though a link would help :) ) Here's the INI code: ; Auto-generated by EclipseNSIS InstallOptions Script Wizard ; Jul 29, 2009 5:42:56 PM [Settings] NumFields=7 Title=RIM BlackBerry Desktop 5.0 installation CancelEnabled=1 [Field 1] Type=RadioButton Left=15 Top=28 Right=100 Bottom=38 Text=Internet State= Flags=NOTIFY [Field 4] Type=RadioButton Left=15 Top=95 Right=100 Bottom=105 Text=Enterprise Flags=NOTIFY [Field 2] Type=GroupBox Left=0 Top=10 Right=300 Bottom=75 Text= [Field 5] Type=Label Left=30 Top=42 Right=235 Bottom=52 Text=For users who are NOT on the Enterprise (Exchange) server [Field 6] Type=Label Left=30 Top=111 Right=235 Bottom=121 Text=Choose this only if you are on the Exchange server [Field 3] Type=GroupBox Left=0 Top=75 Right=300 Bottom=140 [Field 7] Type=Label Left=0 Top=0 Right=130 Bottom=10 Text=Please choose your installation method ...And here's the NSI code: Auto-generated by EclipseNSIS Script Wizard Jul 29, 2009 5:42:16 PM Name "BlackBerry Desktop" RequestExecutionLevel admin General Symbol Definitions !define VERSION 5.0.0.11 !define COMPANY RIM !define URL http://www.blackberry.com MUI Symbol Definitions !define MUI_ICON BBD.ico !define MUI_LICENSEPAGE_RADIOBUTTONS Included files !include Sections.nsh !include MUI2.nsh Reserved Files ReserveFile "${NSISDIR}\Plugins\AdvSplash.dll" Installer pages !insertmacro MUI_PAGE_WELCOME !insertmacro MUI_PAGE_LICENSE license.txt !insertmacro MUI_PAGE_COMPONENTS !insertmacro MUI_PAGE_INSTFILES !insertmacro MUI_PAGE_FINISH Installer languages !insertmacro MUI_LANGUAGE English Installer attributes OutFile RIM_BlackBerry_Desktop_5.0.exe InstallDir "$TEMP\RIM BlackBerry Desktop 5.0 Setup Files" CRCCheck on XPStyle on ShowInstDetails hide VIProductVersion 5.0.0.11 VIAddVersionKey /LANG=${LANG_ENGLISH} ProductName "BlackBerry Desktop" VIAddVersionKey /LANG=${LANG_ENGLISH} ProductVersion "${VERSION}" VIAddVersionKey /LANG=${LANG_ENGLISH} CompanyName "${COMPANY}" VIAddVersionKey /LANG=${LANG_ENGLISH} CompanyWebsite "${URL}" VIAddVersionKey /LANG=${LANG_ENGLISH} FileVersion "${VERSION}" VIAddVersionKey /LANG=${LANG_ENGLISH} FileDescription "" VIAddVersionKey /LANG=${LANG_ENGLISH} LegalCopyright "" Installer sections Section /o Main SEC0000 SetOutPath $INSTDIR SetOverwrite ifdiff ; TESTING PHASE SectionEnd SectionGroup /e "BlackBerry Desktop Section" Section /o Internet SEC0001 SetOutPath $INSTDIR\DRIVERS SetOverwrite ifdiff ; Execwait 'msiexec /i "$INSTDIR\BlackBerry USB and Modem Drivers_ENG (DM5.0b28).msi" /passive' SetOutPath $INSTDIR SetOverwrite ifdiff ; File /r * ; ExecWait '"$INSTDIR\Setup.exe" /S/v/qb!' SectionEnd Section /o Enterprise SEC0002 SetOutPath $INSTDIR\DRIVERS SetOverwrite ifdiff ; Execwait 'msiexec /i "$INSTDIR\BlackBerry USB and Modem Drivers_ENG (DM5.0b28).msi" /passive' SetOutPath $INSTDIR SetOverwrite ifdiff ; File /r * ; Delete /REBOOTOK "$INSTDIR\Setup.ini" ; Rename /REBOOTOK "$INSTDIR\Setup_Enterprise.ini" "$INSTDIR\Setup.ini" ; ExecWait '"$INSTDIR\Setup.exe" /S/v/qb!' SectionEnd SectionGroupEnd Section Descriptions !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN !insertmacro MUI_DESCRIPTION_TEXT ${SEC0000} $(SEC0000_DESC) !insertmacro MUI_DESCRIPTION_TEXT ${SEC0001} $(SEC0001_DESC) !insertmacro MUI_FUNCTION_DESCRIPTION_END Installer Language Strings TODO Update the Language Strings with the appropriate translations. LangString SEC0000_DESC ${LANG_ENGLISH} "Installation for non-Exchange/Enterprise BlackBerry Users" LangString SEC0001_DESC ${LANG_ENGLISH} "Installation for Exchange/Enterprise BlackBerry Users"

    Read the article

  • Keyboard layout change in cocoa application

    - by frederic
    Hi , I'm a newbie, I'm trying to learn objective-c.I have developed a small application which accepts user input and saves it in sqllite. Curently my application supports only english keyboard layout. I have put radiobutton with options English and Danish. On option select the keyboard layout should change to desired on and accept the input. Can anybody help be outwith this. Thank in advance.

    Read the article

  • COMException Problem

    - by Jack Harvin
    Wondering if anyone could help with my problem. Below is the code, and after the code an explination of where the exception is thrown. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Web; using WatiN.Core; using System.Threading; using System.IO; namespace WindowsFormsApplication1 { public partial class Form1 : System.Windows.Forms.Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { } private void button1_Click(object sender, EventArgs e) { Thread t = new Thread(createApplications); Settings.AutoStartDialogWatcher = false; t.SetApartmentState(System.Threading.ApartmentState.STA); t.Start(); } private void createApplications() { createApp("username", "password", "Test App", "This is just a test description", "http:/mysite.com"); } private void createApp(String username, String password, String appName, String description, String appUrl) { var currentBrowser = new IE("http://mysite.com/login/php"); currentBrowser.TextField(Find.ById("username")).TypeText(username); currentBrowser.TextField(Find.ById("password")).TypeText(password); currentBrowser.Button(Find.ById("submit")).Click(); currentBrowser.GoTo("http://mysite.com/createmusicapp.php"); currentBrowser.TextField(Find.ById("application_name")).TypeText(appName); currentBrowser.TextField(Find.ById("application_description")).TypeText(description); currentBrowser.TextField(Find.ById("application_url")).TypeText(appUrl); currentBrowser.RadioButton(Find.ById("client_application_desktop_1")).Click(); currentBrowser.RadioButton(Find.ById("client_application_is_writable_1")).Click(); WatiN.Core.Image captchaImage = currentBrowser.Div(Find.ById("recaptcha_image")).Image(Find.ByStyle("display", "block")); Form2 captcha = new Form2(captchaImage.Src); captcha.ShowDialog(); } } } The exception is thrown on this line: currentBrowser.TextField(Find.ById("username")).TypeText(username); BUT, it's thrown when it gets to this line: captcha.ShowDialog(); It logs in, and fills in the app details and Form2 loads fine, but once loaded, after around 2-3 seconds the exception happens. I am wondering if it's anything to do with the threads? But I wouldn't know how to solve it if it was. The complete exception thrown is: The object invoked has disconnected from its clients. (Exception from HRESULT: 0x80010108 (RPC_E_DISCONNECTED))

    Read the article

  • java spring and ftl

    - by bobby
    I defined a modelview object named "buttonpressed" in spring controller file and I need to access that modelview object in ftl(freemarker) file which is being returned as a view from a controller like abcd.java The abcd.java controller code is as below if (questionAnswer.getAnswerId() == 1045) { modelAndView.addObject("buttonPressed","You have been added in mailing list"); modelAndView.setViewName("enterCode_nextSteps"); } else { modelAndView.addObject("buttonPressed","Not added in the mailing list"); modelAndView.setViewName("enterCode_nextSteps"); } the below ajax function is working fine currently but I am not sure how to access this object called "buttonpressed" in this ajax function. I have written like the way mentioned below but when i am clicking the submit link its not calling "partner.do" and also throwing error saying #buttonPressed is undefind (but in the script below its working fine and calling "partner.do" and even posting data) So is that problem coming from javsscript code i mean due to incorrect use of "buttonPressed" or might be problem from spring controller abcd.java file. <div class="partnerOptInBox"> <div id="optInContent"> <form name="partnerOptIn"> <h4>Want the Latest</h4> <p class="pad10Top">${partnerOpt.translation}</p> <div class="pad10Top"> <input type="radio" name="questionAnswer['${partnerOpt.questionId}']" value="${partnerOpt.getAnswers()[0].answerId}" class="radioButton" /> <label for="questionAnswer['${partnerOpt.questionId}']" class="formLabel pad20Right">Yes</label> <input type="radio" name="questionAnswer['${partnerOpt.questionId}']" class="radioButton" value="${partnerOpt.getAnswers()[1].answerId}" /> <label for="questionAnswer['${partnerOpt.questionId}']" class="formLabel">No</label> </div> <div id="optInError" class="formError" style="display:none;">Oops... your request did not go through, please try again.</div> <div class="pad15Top"> <a href="javascript:submitOptIn();"><img src="images/theme/btn_opt_in_submit.gif"/></a> </div> </form> <script type="text/javascript"> function submitOptIn() { $('optInError').hide(); dataString = $('#partnerOptIn').serialize(); $.ajax({ data: dataString, url: "partnerOpt.do", timeout: 30000, type: "POST", success: function(html){ var newHtml = "<h4>Thank you</h4><p>We appreciate your time to respond to our request.</p>"; $('#optInContent').html(newHtml); }, */trying this code for sucess is throwing me an error /* <!-- buttonpressed function--> success: function(html){ $('#optInContent').html(${buttonPressed}); }, <!-- buttonpressed function--> error: function(){ $('#optInError').show(); } }); } </script>

    Read the article

  • NoSuchMessageException: No message found

    - by adisembiring
    Hi .... I try to learn Spring MVC 3.0 validation. but I got NoSuchMessageException: No message found under code 'name.required' for locale 'en_US' error message when form submted. I have create message.properties in src/message.properties and the content of that file is: name.required = User Name is required password.required = Password is required gender.required = Gender is required I have set ResourceBundleMessageSource in my app-servlet.xml <bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource" p:basename="messages" /> My validator code is: @Component("registrationValidator") public class RegistrationValidator implements Validator { @Override public boolean supports(Class<?> clazz) { return RegistrationCommand.class.isAssignableFrom(clazz); } @Override public void validate(Object target, Errors errors) { RegistrationCommand registrationCommand = (RegistrationCommand) target; ValidationUtils.rejectIfEmptyOrWhitespace(errors, "name", "name.required"); ValidationUtils.rejectIfEmptyOrWhitespace(errors, "password", "password.required"); ValidationUtils.rejectIfEmpty(errors, "gender", "gender.required"); ValidationUtils.rejectIfEmpty(errors, "country", "country.required"); //ValidationUtils.rejectIfEmpty(errors, "community", "community.required"); ValidationUtils.rejectIfEmptyOrWhitespace(errors, "description", "description.required"); if (registrationCommand.getCommunity().length == 0) { errors.rejectValue("community", "community.required"); } } } and JSP Page is: <form:form commandName="registrationCommand"> <p class="name"> <label for="name">Name</label> <form:input path="name" /> <form:errors path="name" cssClass="error"></form:errors> </p> <p class="password"> <label for="password">Password</label> <form:password path="password" /> <form:errors path="password" cssClass="error"></form:errors> </p> <p class="gender"> <label>Gender</label> <form:radiobutton path="gender" value="M" label="M" /> <form:radiobutton path="gender" value="F" label="F" /> <form:errors path="gender" cssClass="error"></form:errors> </p> <p class="submit"> <input type="submit" value="Submit" /> </p> </form:form>

    Read the article

  • Disabling all the Page Control through jQuery.

    - by Sanju
    I am working on asp.net and c#. I am using lots of ASP and HTML controls on the page and in some cases all the controls gets disabled. Some of the used Controls are: RadioButton RadioButtonList CheckBox CheckBoxList TextBox DropDownList Button etc... I need a Simple and short method to disabled all the Controls when i call this jQuery method on some condition. Any Help? Thanks in Advance...

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11  | Next Page >