Search Results

Search found 3025 results on 121 pages for 'textbox'.

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

  • Setfocus to textbox from JavaScript after just creating the textbox with JavaScript?

    - by Scott
    So I just created a textbox with JavaScript like this: EDIT: Added the len variable var len = tbl.rows.length; var rtb = tbl.insertRow(len); var cName = rtb.insertCell(0); var cDis = rtb.insertCell(1); var cDur = rtb.insertCell(2); cName.innerHTML = '<input type="text" name="tbName1' + len + '" value="' + selected_text + '" >'; cDis.innerHTML = '<input type="text" name="tbDis1' + len + '" id="tbDis1' + len + '" >'; cDur.innerHTML = '<input type="text" name="tbDur1' + len + '" >'; var txtBox = document.getElementById('tbDist1' + len); txtBox.focus(); EDIT:Changed the second to last line. Still get this error: txtBox is null txtBox.focus(); The last line isn't working. After I create the textbox, I can't set focus to it. Is there any way of doing so?

    Read the article

  • how to modify a textbox using remoting

    - by danutz0119
    I am trying to modify a textBox found in the server Form using remoting from the client side. i have tried some solutions i found, but none of them work. the remoting part works propperly, the only thing that I am not able to figure out is this: this is what i have: client side: ... private void btn_b1_Click(object sender, EventArgs e) { ... myFunc.update(string s); ... } ... sharedLibs: public interface myInterf { void update(string s); } server side: here i have 2 classes in the same namespace class class1 : MarshalByRefObject, myInterf { public void update(string s) { //what do i write here to modify textBox1? } } public partial class class2 : Form { ... // here is the textBox i am trying to alter; }

    Read the article

  • Asp.net razor textbox array for list items

    - by yycdev
    I can't find or figure out how to take a list of items (cupcakes) and display them in razor with a quantity field. What is happening is I am not able to get the values for each cupcake quantity in the list. Can you do textbox arrays in Razor? VIEW <div class="form-group"> <label>Cupcakes</label> @foreach (var cupcake in Model.CupcakeList) { @Html.TextBox("CupcakeQuantities", cupcake.Id) @cupcake.Name <br/> } </div> MODEL public List<Cupcake> CupcakeList { get; set; } public List<int> CupcakeQuantities { get; set; } CONTROLLER public ActionResult Create() { var model = new PartyBookingModel() { CupcakeList = db.Cupcakes.ToList(), CupcakeQuantities = new List<int>() }; return View(model); }

    Read the article

  • Oversize cursor in Firefox form with textbox background image

    - by Gogster
    Hi all, I have a webform with background images on the textboxes to give them a nice rounded corner. In Chrome the textboxes work as expected, however, if I view the form in Firefox the cursor appears to size to the height of the image, but the text is a normal size. Is there a way to override this oversized cursor? Here is the CSS of the textbox: .ed_form_textbox { width:319px; height:34px; margin-bottom:10px; padding-left:10px; background: transparent url( "/images/textbox.png" ) no-repeat bottom left; position:relative; border:none; } Thanks.

    Read the article

  • How to deal with the new line character in the Silverlight TextBox

    - by Ian Oakes
    When using a multi-line TextBox (AcceptsReturn="True") in Silverlight, line feeds are recorded as \r rather than \r\n. This is causing problems when the data is persisted and later exported to another format to be read by a Windows application. I was thinking of using a regular expression to replace any single \r characters with a \r\n, but I suck at regex's and couldn't get it to work. Because there may be a mixture of line endings just blindy replacing all \r with \r\n doesn't cut it. So two questions really... If regex is the way to go what's the correct pattern? Is there a way to get Silverlight to respect it's own Environment.NewLine character in TextBox's and have it insert \r\n rather just a single \r?

    Read the article

  • jQuery textbox required validation based on another text box having text

    - by doug
    Pretty basic question, however, I am very new to jQuery and javascript in general. I have a jQuery validation that is requiring a text box to have text in it, if a checkbox is checked. <script type="text/javascript"> $(document).ready(function () { $("form").validate( { rules: { Comments: { required: "#IsAbnormal:checked" } }, messages: { Comments: { required: "Comments are required" } }, onkeyup: false, wrapper: "", errorLabelContainer: "#ErrorMessageBox" }); }); Pretty straight forward, if you check the IsAbnormal checkbox, it will throw a validation if there are no comments. What I am trying to do is require a textbox based on if another text box has any text in it, for instance require the old password if a user enters a new password into a textbox. Is there an easy way to get the required: "#NewPassword:NotBlank" to work?

    Read the article

  • Jquery Iframe textbox

    - by ctroy
    I am new to Jquery, In fact, I have 0 knowledge using JQuery. I am trying to get something to work using JQuery. I have a html page with an iframe. The iframe page has a form in it and a textbox in it. The Iframe is actually created by another jquery function and is inside a div. Now, when I click a link on the main page, I want the textbox in the iframe to be populated with some value. Is it possible to get this to work? <html> .... ... <a click="populate()">Populate IFrame</a> .... ... <div id="iframediv"></div> ... ...

    Read the article

  • TextBox loses text when InvokeRequired == false

    - by Tom
    This is modified code I found on this site. When appending text to a TextBox and InvoveRequired is false the text will display in the box but the next time the function is called and InvokeRequired is true the text string placed by the first call is lost (""). Multiple calls when InvokeRequired is true work as expected. comBox is a type TextBox with multline = true. Any help would be appreciated. public void LogComText(string comText, bool newline) { if (comBox.InvokeRequired) { comBox.BeginInvoke(new Action(delegate { LogComText(comText, newline); })); return; } comBox.AppendText(comText); if (newline) comBox.AppendText(Environment.NewLine); }

    Read the article

  • How to disable TextBox on client-side click on CheckBox

    - by abatishchev
    How to disable asp:TextBox on client-side click on HTML checkbox or server-side asp:CheckBox using JavaScript? <script type="text/javascript" language="javascript"> function enableTextbox() { // ? } </script> <table> <tr> <td> <input id="checkTake" onclick="enableTextbox" title="Take?" /> </td> </tr> <tr> <td> <asp:TextBox runat="server" ID="txtCommission" /> </td> </tr> </table>

    Read the article

  • add/delete image ID to/from textbox when image clicked

    - by Huseyin
    I am working on a simple news module. There is a form where user adds multiple image IDs to one textbox then submits it. To improve the usability, I listed all the images they can add (ID numbers displayed next to it) on one side. However, this still is little bit confusing. I want image IDs added/deleted to the textbox when user clicks on the images. Spare me codes, methods, ideas, examples... I will take anything.

    Read the article

  • Activate WPF command based on TextBox value

    - by zendar
    This is MVVM application. I have form and related view model class. There is TextBox, Button and ListBox on form. Button is bound to DelegateCommand that has CanExecute function. Idea is that user enters some data in text box, presses button and data is appended to list box. I would like to enable command (and button) when user enters correct data in TextBox. Things look like this now: CanExecute() contains code that checks if data in property bound to text box is correct. Text box is bound to property in view model UpdateSourceTrigger is set to PropertyChanged and property in view model is updated after each key user presses. Problem is that CanExecute() does not fire when user enters data in text box. It doesn't fire even when text box lose focus. How could I make this work?

    Read the article

  • jquery adding in select list by textbox

    - by mazhar
    ok what i am trying to do is to add something in the textbox and after pressing the add button it should go into the select list. how would i do that with jquery? I am not really able to make it work by your method .Please help? What i am doing wrong <%= Html.ListBox("FeatureLists", ViewData["FeatureListListBox"] as MultiSelectList)% $("#add").click(function() { var val = $("#txtaddfeature").val(); alert("aaa"); $("", { 'value': val, text: val }).appendTo("#FeatureLists"); //$("#textbox").val(''); here if you want to clear the value for next time });

    Read the article

  • jquery datepicker and aspx TextBox visible problem

    - by senzacionale
    $(".inputTypeDate").datepicker({ dateFormat: "dd.mm.yy", changeMonth: true, changeYear: true }); <asp:TextBox ID="txtBirthday" runat="server" CssClass="inputTypeDate" Visible="false" ValidationGroup="urgent"></asp:TextBox> in aspx we have some component set to Visible="false" then we change visibility to true. But jquery datepicker calendar does not work in this component. If Visible="true" by default then works. Why and how to fix that. I think that problem is in changing visibility.

    Read the article

  • Asp.net button click populate Autocomplete for a textbox

    - by Geetha
    Hi All, I have created a keyboard using asp:button control. Onclientclick event it will display the corresponding text on the textbox. All these are working fine. Needs: I want to add autocomplete using jquery to a textbox. if i click the button [A] it has to display all the records with a. This process is working if im using the system keyboard. Code: <link href="CSS/jquery.autocomplete.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="js/jquery.autocomplete.js"></script> $("#antSearchText").autocomplete('SearchAutoComplete.ashx'); <asp:Button ID="six" runat="server" Text="6" CssClass="myclass" OnClientClick="return typeLetter(this);" /> Geetha.

    Read the article

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