Member Avatar

I am having trouble on how will I solve this problem. I want only to refresh the value of listbox after adding a value from textbox using onclick() on an image. <form id="UpdateDetails"> <input type="hidden" name="id"> <input id="adnew" type="text" autocomplete="off" name="addnew" class="xx"> <img id="img" onclick="addnew()" src="images/icons/add-icon.png" style='padding:0 0 0 10px;height:15px;width:15px;cursor:pointer;' title='Add New' /> <span id="checkStatus"></span><br/> <select multiple> <?php $id=$_POST['id']; $sq = mysql_query("SELECT testVal FROM x_file WHERE id='$id'"); while($q = mysql_fetch_array($sq)){ echo "<option value=".$q['testVal'].">".$q['testVal']."</option>"; } ?> </select> </form> <script> function addnew(){ $.ajax({ type: 'post', url: 'addnew.php', data: $('#UpdateDetails').serialize(), success: function (info) { $('#checkStatus').fadeIn(250).css('color', '#017c04').html(info).delay(1000).fadeOut(500); clearInput(); } }); } </script>

0
12
Member Avatar

Hi, I have a listbox with databinding . It has more then 15 items . And I need to auto scroll to the selected item may be item 10 in the code file I used a jQuery like <script type="text/javascript" language="javascript"> function LstFocus() { $('#<%= LstBoxClasType.ClientID %>').find(':selected').filter(':first').focus().attr("selected", true); } </script> But it work in mozilla firefox only and not not work in IE. How can I do that ? Thanks in advance.

0
1
Member Avatar

Hi, I have made a code where I write a recipe to a file and then I can read from the file and it is output in a listbox. I need to allow the user to change the amount of people served and then the quantities change to suit the serving number. The serving number is input and the rest of the code works apart from the changing the quantities bit. The code that I am using is below. I have no idea if i'm doing it right though. Private Sub btnOKServed_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles …

0
2
Member Avatar

I am working on a class assignment and I'm stuck. I would like to copy listBox2(from Form1) to listBox3(from Form2). The code I have now compiles, but it does not copy the listBox2 to listBox3. Also, when I click btnAdd in Form2 is adds txtnewcourse.txt(from Form2) to listBox2(from Form1) not listBox3(from Form2) like it should. Here is my code: public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void btnSelect_Click(object sender, EventArgs e) { foreach (object x in listBox1.SelectedItems) listBox2.Items.Add(x); } private void btnClearSelection_Click(object sender, EventArgs e) { listBox1.SelectedIndex = -1; } private void btnDeleteSelected_Click(object sender, …

0
1
Member Avatar

[ICODE]listbx.Items.Add(New _ ListItem(BorderStyle.None.ToString(), BorderStyle.None)) listbx.Items.Add(New _ ListItem(BorderStyle.Double.ToString(), BorderStyle.Double)) listbx.Items.Add(New _ ListItem(BorderStyle.Solid.ToString(), BorderStyle.Solid))[/ICODE] can anyone please tell me how to do this in asp code.. in vb.net it adds the borderstyle as value... when i try that in asp.net it just adds string value. [ICODE]<asp:ListItem Text=Solid Value=Solid></asp:ListItem>[/ICODE] do I have to use ctype while retrieving ...? ..please help. anyone?

0
1
Member Avatar

I have quite a long list on my listbox. And when I wanted to search for words like "Boy", I need to go through all the letters before 'o', for example, 'bacon', 'banned', 'because' and so on. I know that the listbox allow the user to search for the first initial of the word on the list, but can I search for the second letter of the word and so on on the list box as well? If it is possible, please teach me how to.

0
1
Member Avatar

Hi all, I am new to XAML however I have an understanding of XML. I am trying to bind a button to an XML file such that when the button is clicked, it the xml element is displayed within a listbox. Then I want the listbox selected item to be displayed in a textblock. So far I have been able to bind the listbox to the xml file as source but I need some examples concerning the afore mentioned matter. Any help is appreciated. Thanks

0
2
Member Avatar

hi all..I am new on C# .My problem is I have a 1 combo box, list box and button . When I choose value on combobox it search on database nd shows on listbox. and I used OwnerDravFixed method..It works and when i change combobox value it show that some line with another colour.But I need to take this value from button click.But second time i cant call this lisbox_DrawItem method.. Any idea? here my codes [CODE] public void groupComboBox() { connection.Open(); MySqlCommand cmd = new MySqlCommand("select Group_NO from sinif", connection); reader = cmd.ExecuteReader(); if (reader.HasRows) while (reader.Read()) { groupcomboBox.Items.Add(reader["Group_NO"]); …

0
1
Member Avatar

I am using Visual Studio 2008. I have made a dropdown list or a Listbox containing various country names and their local site URL. the purpose is to redirect the visitor to correct local site of their choice. I've created the Dropdown List but, I am unable to make the button work. I've added a separte Go Button beside the list box which will carry out the action of routing as per selected option once it pressed. Please Help me building this as early as possible. Thanks

0
1

The End.