Solved

AUTO FILL TEXT BOX

Posted on 2011-10-01
4
202 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
jquery, html5 UI 1 45
date format angularjs2 16 35
updateParent() HTML Javascript 21 58
javascript error when invoking bingmaps 13 14
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

728 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now