Solved

AUTO FILL TEXT BOX

Posted on 2011-10-01
4
212 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

713 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