w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Disabling Text Boxes depeding on Text Boxes values using MVVM?
To enable updates on any change of the text value (without having to lose focus) add the UpdateSourceTrigger flag to the binding. <TextBox Text="{Binding MyTextProperty, UpdateSourceTrigger=PropertyChanged}" />

Categories : Wpf

What is the assertion method which we should use when you need to check validation for mandatory text boxes in codedUI Automation?
I'm going to assume you're doing Unit Testing of some sort, thus the Assertions. As @Jon stated. Use something like Assert.AreNotEqual(yourString, String.Empty); You could also use something like .IsTrue or .IsFalse as long as you organize the contents of the Assertion to check whether the string is empty or not.

Categories : C#

data-bind multiple text boxes to display in one text box
I will write solution using jQuery JavaScript library, and you should use jQuery because its much easier and easier to read and also to avoid errors in different browsers. **HTML** Server: <input type="text" id="server"/><br/> Database: <input type="text" id="database"/><br/> Username: <input type="text" id="username"/><br/> Password: <input type="text" id="password"/><br/> <br/> Full CS: <input type="text" id="solution"/><br/> JS <script type="text/javascript"> var _template = 'Data Source=%server%;Initial Catalog=%db%;Persist Security Info=True;User ID=%user%;Password=%pass%'; $(document).ready(function(){ $('#server,#database,#username,#password').keyup(function(){ updateSolution();}); });

Categories : Javascript

Text Boxes Validations in Jsp
I would suggest you add a cssClass to them. So you have easier time selecting them. Here is an example: Mark up <asp:TextBox CssClass="compare" runat="server" ID="txt1">test</asp:TextBox> <asp:TextBox CssClass="compare" runat="server" ID="txt2">test</asp:TextBox> Javascript var elements = $('.compare'); if (elements.eq(0).html() === elements.eq(1).html()){ //do stuff } Fiddle Demo Remember this only does client side validation.

Categories : Javascript

Checking if text boxes are empty
.Count >= -1 The count will be 0 if it's empty If emptyTextBoxes.Count <> 0 Then MessageBox.Show(String.Format("Please fill following textboxes: {0}", String.Join(",", emptyTextBoxes))) Else Dim PartePersonalTableApt As New PersonalObraDataSetTableAdapters.PartePersonalTableAdapter Dim PersonalObTableApt As New PersonalObraDataSetTableAdapters.PersonalObTableAdapter PartePersonalTableApt.ClearBeforeFill = True PartePersonalTableApt.FillByFecha(PersonalObraDataSet.PartePersonal, txtDate.Text, txtDepartamento.Text, txtTurno.Text) PersonalObTableApt.ClearBeforeFill = True PersonalObTableApt.Fillby(PersonalObraDataSet.PersonalOb) End If

Categories : Vb.Net

Limit input text boxes to just 0 or 1
Try using .keydown: http://api.jquery.com/keydown/ Keyup waits until the user release the key from their keyboard which will give you a split second of input.

Categories : Jquery

Two separate text boxes with same "id" attribute
<input type=text id='test' value="1"> <input type=text id='test' value="2"> document.getElementsByTagName('input')[0].value //1 document.getElementsByTagName('input')[1].value //2 very dirty way of doing things

Categories : Javascript

ASP.net text-boxes are acting flaky
In the css class try to add a big z-index value. ie z-index:999; If this works it's because a element if over your textbox and it does have a transparent background. Edit: are you using different browsers? like IE to test the deployed version and FF to test your local version?

Categories : Asp Net

Dynamic Calculations in Text Boxes?
WORKING DEMO Just a simple demo,nothing fancy.This is in jquery,but I guess logic is what we want. $('input').on("keyup",function () { $("#result").val(parseInt($("#amount").val(), 10)* 15); });

Categories : PHP

One of two text boxes are not updated with binding
You are using _below = AboveAircraft; in your AboveAircraft setter method but you are binding BelowAircraft. Either change _below = AboveAircraft; to BelowAircraft = AboveAircraft; or send notification for BelowAircraft too, i.e. if (PropertyChanged != null) { PropertyChanged(this, new PropertyChangedEventArgs("AboveAircraft")); if (_above < _below) { _below = AboveAircraft; PropertyChanged(this, new PropertyChangedEventArgs("BelowAircraft")); } } When you change a property that changes another binded property, you have to send notification for both Properties, not only one. Of course you have to apply the same changes to the BelowAircraf

Categories : C#

Multiple text boxes issue
Multiple page elements are not supposed to have the same 'id'. That is why you keep getting the first element when using the 'id' to grab the textbox because the 'id's on the textboxes are all the same. You can create an iterator that increments on each pass through the loop and use that to put a unique number on the end of each textbox id (in both the textbox itself and the generated javascript).

Categories : C#

Input text boxes keep disappearing
Don't use document.write. It wipes out your whole document. Instead, have an element where you can write data, like <p id="output"></p> Then code it like this: function readBox() { var a = document.getElementById('a').value; var b = document.getElementById('b').value; document.getElementById("output").innerHTML = Number(a) * Number(b); }

Categories : Javascript

Add text boxes to HTML and use with JQuery
Yes set up event delegates $('#practiceGroup').on('focus', '.formatTextWithin', function() { if(this.value == 'Practice Name' && this.value = '') { ... } }); $('#practiceGroup').on('blur', '.formatTextWithin', function() { if(this.value == '' && this.value = 'Practice Name') { ... } });

Categories : Javascript

Require some text boxes to be filled in but not all
Place your textboxes in an array, then do some validation. //Place textboxes in array for easy access TextBox[] validatedTexboxes = new TextBox[] { textbox1, textbox2, textbox3, ... }; //On submit, make sure 40 are filled in. var filledTextboxes = validatedTexboxes.Count(x => !String.IsNullOrWhiteSpace(x.Text)); if (filledTextboxes > 40) //Do Something

Categories : C#

Jquery Radio and text boxes
You can use .change events from jQuery: $("#<%= rb2.ClientID %>").change(function() { $("#<%= txt2.ClientID %>").prop("disabled", this.checked); });

Categories : Javascript

Rich Text Editor (YUI Simple Text Editor used) not sending data to next page
The saveHTML() method you used does not seem to save the value to the textarea element. And because the browser doesn't care about YUI Editor and just submits what is there already in the textarea (which is null), it submits the input as null.. You should set the value of the textarea to the editor value so the browser will submit that value instead of null.. Which can be achieved using this little line: document.getElementsById("msgpost").value = html; See this working JsFiddle I made for you. However you had HTML syntax errors too. The onSubmit attribute should be on the form element not the submit button. And listening to the event is not practical when you can simply call a function when the form submits.. (See the JsFiddle)

Categories : Javascript

updating a sql 2005 database using text boxes in vb.net
Your using a INSERT syntax for your UPDATE statement. Your UPDATE statement should have the form: UPDATE tableName SET col1 = val1, col2 = val2, col3 = val3 WHERE someColumn = someValue Additionally, you are wide open to SQL Injection attacks by using non-parameterized queries. Finally, I would use a Using blocks to ensure your connection and command are properly closed and disposed of. Putting it all together it would look something like this: Using Dim cn As SqlConnection = New SqlConnection("Data Source=NIMO-HPSQLEXPRESS;Initial Catalog=FYP_db;Integrated Security=True") cn.Open() Dim sqlQuery As String = "UPDATE TblCustomerDetails " + _ "SET compName = @compName, " + _ "compContact = @compContac

Categories : Vb.Net

How to validate text boxes with in a div javascript or jQuery
Add a validation="regex here" to the input tags first of all to give them an easy visual notification. Beyond if you want to validate with jQuery, you can check each value and not send out an ajax request if any are invalid, using something like this to verify that ( string in this case ) values are correct $(your_element_here).val().match(your_regex_here) Perhaps an if ($(#id).val().match(some_verification_regex) == null){ return false } only letters: /^[A-z]+$/ phone number like you mentioned above: /^(d{3}) d{3}-d{4}$/

Categories : Javascript

How to use Wkhtmltopdf converter with filled text boxes?
wkhtmltopdf renders an HTML page it "sees", not how the browser displays it. When you fill out the form, the values in the fields are not part of the underlying HTML structure (though they are part of the DOM). As a work-around, you can do the following: Capture and save all of the form parameters' values somewhere (session, file, database, etc) when the form is submitted. Generate a new HTML page using the same code as the form page. Fill in the form values you had saved directly into the HTML code. In other words, specify the value attributes on the form with the inputs you captured. For example, if you have a text field called customer_name and the user submitted John Doe, hard-code the value into the tag: <input type="text" name="customer_name" value="John Doe"> Now wkhtml

Categories : Asp Net

Some text boxes become blank when click on submit
I think when submitting the form the hasPlaceholder class is getting applied. So when submitting the form the values are getting empty. $('form').submit(function () { $(this).find('.hasPlaceholder').each(function() { $(this).val(''); }); }); On blur event the hasPlaceholder is getting applied to the text boxes. So the when submitting the form the input with class hasPlaceholder is emptying the value. So on form submission the values are not obtained in the server side. .blur(function () { if ($(this).attr('placeholder') != '' && ($(this).val() == '' || $(this).val() == $(this).attr('placeholder'))) { $(this).val($(this).attr('placeholder')).addClass('hasPlaceholder'); } }); Update: Try replacing

Categories : PHP

dynamically creating Input text boxes
This is certainly possible using bare bones JQuery, but I would encourage you to look into a template based solution: Two frameworks that come to mind are KnockoutJS and HandlebarsJS. The key point here is that it's nice to avoid looping out markup using JQuery, but instead use template based data binding: http://handlebarsjs.com/ http://knockoutjs.com/ Granted, it might be overkill for this particular problem, but I would argue that it's a very useful technique to learn for more advanced scenarios.

Categories : Javascript

Auto tab credit card text boxes in ASP.Net
Ok - I got it. jQuery("#<%=txt1.ClientID %>").keyup( function changefocus() { if (jQuery("#<%=txt1.ClientID %>").val().length >= jQuery("#<%=txt1.ClientID %>").attr('maxlength')) jQuery("#<%=txt2.ClientID %>").focus(); }); jQuery("#<%=txt2.ClientID %>").keyup( function changefocus() { if (jQuery("#<%=txt2.ClientID %>").val().length >= jQuery("#<%=txt2.ClientID %>").attr('maxlength')) jQuery("#<%=txt3.ClientID %>").focus(); });

Categories : Javascript

Add selected number of text boxes using jquery
You could try this: $("select").change(function () { $(this).siblings("input").remove(); for (i = 0; i < this.value; i++) { $("<input/>", { type: text, id: "textbox" + i //you add more attributes here if you want }).appendTo("#text"); } }); Here's a demo : http://jsfiddle.net/bPdPE/5/ Please look at .change() at jquery site.

Categories : Jquery

StoredProcedure in C#, passing parameters from text boxes
Correct me if I'm wrong, but it seems that this line cmd.Parameters.Add("@LastName ", SqlDbType.Date); Have an extra space after LastName. Should it be cmd.Parameters.Add("@LastName", SqlDbType.Date); Instead?

Categories : C#

Integrate all the text boxes in one `KeyUp` event
$("input").keyup(function (event) { if (/D/g.test(this.value)) { this.value = this.value.replace(/D/g, ''); } }); Or base it on a common class that you may put on the textboxes in question $(".commonClassOnInputBoxes").keyup(function (event) { if (/D/g.test(this.value)) { this.value = this.value.replace(/D/g, ''); } });

Categories : Jquery

Populate text boxes from List Values
Sounds like you want to create a foreach loop and iterate round the linq query creating a new text box on each one and adding it to your form. It'd help to see what you've got so far. I've put an example below using a list instead of a linq query but what comes after it is the same private void Form1_Load(object sender, EventArgs e) { var newList= new List<string> {"box1", "box2", "box3"}; foreach (var boxName in newList) { TextBox newTextBox = new TextBox(); newTextBox.Text = boxName; this.Controls.Add(newTextBox); } }

Categories : C#

Query criteria from another form's text boxes?
It sounds like the db engine can't find those text boxes. Reasons that can happen include: The form is not open in Form View. The form or text box name is misspelled. The query is run from outside the Access application session where the form is open. If none of those apply, all I can suggest is to try simplified queries which focus on just the text boxes ... and hack on those until Access cooperates. Create 2 new queries, each focused on one of those text boxes. SELECT [Forms]![frmQuarter]![StartQuarterDateTextbox] AS start_date; SELECT [Forms]![frmQuarter]![EndQuarterDateTextbox] AS end_date;

Categories : SQL

Datepicker for dynamically generated text boxes
$('input:text[id^=t]') selects all elements with input type text and id starting with t $('input:text[id^=t]').datepicker(); attribute-contains-selector ^ attribute-starts-with-selector Updated after OP updated question onSelect: function (dateText, inst) { var id = this.id.replace('h',''); $('#t'+id).val(dateText); }

Categories : Jquery

Scrolling two rich text boxes together, I can't figure it out
After testing your code, it seems to work OK. Your problem may be that you don't know how to use the code, you have to declare new richtextboxes as RichTextBoxSynchronizedScroll not as the standard RichTextBox: //Here is the test public partial class Form1 : Form { public Form1(){ InitializeComponent(); rb1.Size = new Size(200,100); rb2.Size = rb1.Size; rb2.Left = rb1.Right + 5; rb1.Parent = rb2.Parent = this; rtb1.BindScroll(rtb2); //try populating some data for both the richtextboxes for(int i = 0; i < 200; i++) rtb1.Text += Guid.NewGuid() + " "; rtb2.Text = rtb1; //now try scrolling the rtb1 //I suggest you should add WM_MOUSEWHEEL = 0x20a into the if statement //something like this: if (m.Msg == WM_VSCRO

Categories : C#

Get Average of present filled text boxes in jquery
Here i find solution , try this :- jQuery(".prj_usage").keyup(function(){ var sum = 0; var avg = 0; jQuery('.prj_usage').each(function() { sum += Number(jQuery(this).val()); }); var $allx = jQuery(':text.prj_usage'); var $emptyx = $allx.filter('[value=""]'); var num = $allx.length - $emptyx.length ; if(num > 0){ avg = Number(sum/num); } jQuery('#prj_usgtot').val(sum); jQuery('#prj_usgavg').val(avg.toFixed(2)); });

Categories : Jquery

Scroll a view with 20 text boxes horizontally using UIScrollView
You can find plenty of questions about this topic (i.e., Calculate the contentsize of scrollview), but nonetheless here is my solution: You want to use the UIScrollView for the task. Using it is rather simple in fact. First you need to initialise and display the UIScrollView somewhere in your screen. I am going to assume that you are in a UIViewController, and that you want to create a scroll view of 300px width and 200px height. For this, you can do the following: UIScrollView *aScrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, 300, 200)]; [[self view] addSubview:aScrollView]; [aScrollView setScrollEnabled:YES]; Now its time to place the content inside of it. The key idea here to take into consideration is the following. While the 'UIScrollView' has a size itself, it

Categories : IOS

how do I dynamically print out a page that is loaded into text boxes?
elclanrs has the right idea. The code you wrote isn't maintainable. Try something like this: // My print_list function assumes that I have some textboxes that are class // textboxClass function print_list() { Array.filter( document.getElementsByClassName('textboxClass'), function(elem){ $(".printing_list").printElement( elem ); }); } If you assign class textboxClass to all of your text boxes, this will loop through each of them, and you can do whatever you want.

Categories : Java

incrementally un-hide input boxes and text with 1 button
To increment something, it has to start with something other than undefined, and you mixed the quotes: var addanother = 0; function increment(){ addanother++; $('.addmore'+addanother).show(); } FIDDLE

Categories : Jquery

Automatic update of Text Boxes using a class of variables
Two options Do they really need to be 50 textboxes ? could you create a ListView that is displayed as a GridView that has a Binding to the Dataset http://www.c-sharpcorner.com/uploadfile/mahesh/gridview-in-wpf/ Other option would be to create the controls programatically on Window2, after the results or Window1 are ready and assign its value with a foreach or similar

Categories : C#

Show text boxes depending on drop down box selection
try this <asp:Label ID="NumAccounts" runat="server" Text="# of Accounts"></asp:Label> <asp:DropDownList ID="EmpNameList" runat="server" onselectedindexchanged="NumAccountsList_SelectedIndexChanged" AutoPostBack="True"> </asp:DropDownList> <div> <asp:PlaceHolder id="ContentPlaceHolder1" runat="server" /> </div> protected void NumAccountsList_SelectedIndexChanged(object sender, EventArgs e) { ContentPlaceHolder1.Controls.Clear(); for(i=0; i<Convert.ToInt32(EmpNameList.SelectedItem.Value); i++) { TextBox tx= new TextBox(); tx.ID="tx"+i;

Categories : C#

Missing cursor in form text boxes in Firefox 23
I have traced this back to my code, with the following being the culprit. $('form').on('focus','li', function(event) { if($(this).closest('form').attr('id') == 'oform'){ return false; } $(this).closest('form').find('li').css('zIndex', '0'); $(this).css('zIndex', 1998); }); I changed return false; for event.preventBubble = true; and this resolved the issue for Firefox.

Categories : CSS

How to target dynamic generated text boxes using javascript
One of the idea could be put a css class on the textbox. If it is generated by your code dynamically. And then use class selector in your jQuery. $('.inputcss').keyup(function(){ this.value = this.value.toUpperCase(); }); Or even you can use id of the gridview and find input:text inside the gridview and use your function. Below is a sample code $('#<%=grid.ClientID%>') .find('tr') .each(function(row) { $(this).find('input') .each(function(col) { $(this).keyup(function(){ this.value = this.value.toUpperCase(); }); } }); }); }); Edit 1 And if you only want to show in upper case you can use css as follows h1 {text-transform:uppercase;} More det

Categories : C#

JSColor Not Working on Volusion Option Text Boxes
I think you are trying to load the JS file $('<script type="text/javascript" src="/v/js/jscolor.js"></' + 'script>').appendTo(document.body); on window.load event, Instead of loading at runtime or appending JS location at runtime, you can specify this in theme for all pages, this may add JS without using it on all pages but it should resolve the issue which you have mentioned in your post. Also I can see textbox name is TEXTBOX___293___TEST-PRODUCT-COLOR___51 and you have written it as TEXTBOX___290___TEST-PRODUCT-COLOR___251. Try above two options and see if your problem resolved. Volusion Design Volusion Design

Categories : Javascript

overlaying text boxes on an image in specific positions
If you are saying you want a background image for your form, just apply a background image via css. There is no reason to create an element behind the form as a background, unless you would plan on applying animation via js. Which even then i would suggest using AS2/AS3. So, as i said use background image on your form via css.

Categories : Javascript

Reading data from text boxes inside a table
try changing: for (i = 0; i < rowLength; i++) { var value=[]; for (j = 0; j < 4; j++) { value.push(table.rows[i].cells[j].firstChild.data); } var val=JSON.stringify(value); var key = "xyz" + localStorage.length; localStorage.setItem(key, val); } to for (i = 0; i < rowLength; i++) { var value=[]; for (j = 0; j < 4; j++) { // getAttribute is probably what you're after here value.push(table.rows[i].cells[j].firstChild.getAttribute('value')); } var val=JSON.stringify(value); var key = "xyz" + localStorage.length; localStorage.setItem(key, val); }

Categories : Javascript



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.