Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to auto-populate a list menu or textfield from a text file

Posted on 2012-03-19
6
Medium Priority
?
228 Views
Last Modified: 2012-05-23
I have a submission page where a user enters their contact information. They also have to enter a specific case number for their submission. Issue is that some users enter case numbers that are not in the system.

I have created a way for real case numbers to automatically populate a text file (*.txt) on a daily basis. The main issue I have is how to force users to either enter or select the correct case number. There are roughly 250 case numbers and the format is the same for the case numbers.

Any suggestions along with direction (web pages/sites) are greatly appreciated. Can I use JavaScript? What about AJAX? The page is written in classic ASP but I'm willing to modify to accomplish my needs.

Thank you for your suggestions and direction.
0
Comment
Question by:arendt73
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 40

Expert Comment

by:Gurvinder Pal Singh
ID: 37738463
rather than asking user input in a text box, show the user a drop down below the text box (like auto-suggest) and force him to select from that drop down rather than accepting from textbox.

something like this
http://www.pengoworks.com/workshop/jquery/autocomplete.htm
0
 
LVL 20

Expert Comment

by:Proculopsis
ID: 37738684
<!--

Try jQuery AutoComplete

-->

<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title> - jsFiddle demo</title>
 
  <script type='text/javascript' src='http://code.jquery.com/jquery-1.7.1.js'></script>
  <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.js"></script>
 
<script type='text/javascript'>//<![CDATA[

jQuery(document).ready(function() {

    $("input#autocomplete").autocomplete({
        source: ["1000", "1001", "1002", "1003", "1004", "1005", "1006", "1007", "1008", "1009"]
    });


});
//]]>  

</script>

</head>
<body>

  <input id="autocomplete" />

 </body>
</html>
0
 

Author Comment

by:arendt73
ID: 37738708
Proculopsis, thank you. I'll give this is shot.  In the meantime, the autocomplete source will be a text file (info.txt). What would the code look like pointing to the text file?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 20

Expert Comment

by:Proculopsis
ID: 37740872
For the source option you can use a url pointing to the data, you just need to make the file available on your server, at that location.
0
 

Accepted Solution

by:
arendt73 earned 0 total points
ID: 37745141
So instead of what you have currently now,

source: ["1000", "1001", "1002", "1003", "1004", "1005", "1006", "1007", "1008", "1009"]

It would look like this?

source: www.myserver.net/test/test.txt
0
 

Author Closing Comment

by:arendt73
ID: 38001430
Solution given acceptable.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

609 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