buckibooster Posted February 24, 2015 Share Posted February 24, 2015 I have a text input tag in html from which I am trying to pass the data input into the tag as it is being typed in (see below). <INPUT TYPE="TEXT" STYLE="width:225px" ID="vData_RptrLName" NAME="vData_RptrLName" onkeyup="showHint(1, this.value)"> As you can see, I've added an onkeyup event within the input tag that calls a javascript function and passes the typed in information as an argument of "this.value." I'm actually trying to create an AXIS call using the letters input into the text field in a hint function similar to that provided in the W3Schools AXIS tutorial. My problem is that whatever I type into the input field is received by the javascript as a value of "1." When I replace "this.value" with specific letters (e.g., "Col"), the javascript works and returns a list of data values beginning with the letter "Col." I can also start the javascript off with a command to get the value of my input field (i.e., document.getElementById("myField").value) and it works as well. Unfortunately, this limits the use of my javascript to only that field. I'm using IE10. Has anyone got any idea why "this.value" isn't working? Link to comment Share on other sites More sharing options...
davej Posted February 25, 2015 Share Posted February 25, 2015 I see no problem with IE11. Can you create a small example file which demonstrates your problem? I suspect you have some malformed markup. Have you tested your page with the W3 validator? See... http://validator.w3.org/ Link to comment Share on other sites More sharing options...
Ingolme Posted February 26, 2015 Share Posted February 26, 2015 You should show us what the code for showHint() is. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now