Solved

AUTO FILL TEXT BOX

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
When we use cache:false ajax? 1 31
how can i test my code? 1 33
Getting selected value of a dropdown with jquery 7 31
Can't find PHP files on account that has WordPress 3 25
This article discusses four methods for overlaying images in a container on a web page
Find out what you should include to make the best professional email signature for your organization.
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…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

815 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

8 Experts available now in Live!

Get 1:1 Help Now