Solved

AUTO FILL TEXT BOX

Posted on 2011-10-01
4
211 Views
Last Modified: 2012-05-12
I have a form in html and i want when someone press a number in "Phone" text box like 2106
i have a table with 3 columns "from" "to" "area " in a database-MYSQL or CSV-textfile
i want to check while pressing or when this text box lose focus to check ...

if phone > from and phone < to then show area in another text box else the other text box empty

*sorry for my english
0
Comment
Question by:rockas1982
  • 2
  • 2
4 Comments
 
LVL 13

Expert Comment

by:Hugh McCurdy
ID: 36897481
Unfortunately, I don't understand what you want.  Javascript is likely what you need to solve the problem.  I don't know how well you know Javascript so I'll direct you w3 schools.  Perhaps you can find something similar to what you want done and we can proceed from that point.

http://www.w3schools.com/js/
0
 
LVL 1

Author Comment

by:rockas1982
ID: 36897497
look it's very simple

i have a form with 2 fields phone and location

when someone press on the phone a number like 5

i want to search a table or an array whatever is easier and search inside it

like this
select location where phone > from and phone < to
and i want the result to be shown in the second filed  
0
 
LVL 1

Author Comment

by:rockas1982
ID: 36897532
Something like this

<html>
<head>
<script type="text/javascript">
function changetext(){
	var userInput = document.getElementById('phone').value;
	document.getElementById('area').value = userInput;
}
</script>
<input type='text' onKeyup='changetext()' id='phone' value='' />
<br>
<input type='text' id='area' value='' />

</body>
</html> 

Open in new window


but i want the second value to be searched inside a table or inside an array
0
 
LVL 13

Accepted Solution

by:
Hugh McCurdy earned 500 total points
ID: 36899589
I'm not sure I understand yet.  Sounds like you are OK with the Javascript - right?

Do you need help searching SQL or XML?

Note: if you want to abandon this thread to award zero points and start a new thread with a different title (to attract more attention), I will not issue an objection.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question