Just wondering if someone can help. I have a slight problem and have come up with a solution on paper, now I just need to transfer it into something that actually works!
What I want is to make a program or HTML page which does the following;
Contains a text-box and when a user types in a specific fault code, they are given information on how to clear the code. I have thought of just using Microsoft Excel, but I have about 100 different codes and would prefer it if I had something like "Please enter your problem code below" rather than a drop down box where users have to sift though to find the necessary code.
I know I could probably do this using if/when statements, but I want something that looks nice and is very intuitive to use,
I would use an HTML form, with a text input field for the user to enter their error code.
You could add some sort of "auto suggest" functionality, which would have the form make suggestions as they type (bit like Google).
You could then either display the end result when the user submits the form, or you when encounter an exact match.
This could all be done in JavaScript and PHP
How well do you know your JavaScript from your jQuery?
Check out SitePoint's latest JavaScript challenge
Could you advise the best way to find the information to do this with JavaScript? Is there a specific thing this is called to help me locate the resources to learn? I have a fairy decent grasp of HTML and CSS to create and layout the page, just lack the important part of adding the functionality aspect!
I would probably use jQuery to do this, especially if you are not overly familiar with JavaScript.
One possibility would be to use the jQuery UI autocomplete plugin
This allows you to hard-code your error message codes into your JS file and might work quite well for a comparatively small amount of data.
If you want a bit more flexibility, you could try storing your error codes in a database and fetcing them via PHP / AJAX.
Here's a bit more info on that: http://www.htmlblog.us/jquery-autocomplete
This seems like it might be a fun project, so let me know if you have any questions.
How well do you know your JavaScript from your jQuery?
Check out SitePoint's latest JavaScript challenge
That sounds cool.
But what might be even cooler, is to fetch the instructions for how to clear and resolve the code dynamically and insert them into the page using AJAX.
This would however, speak for the database method, as then you could store everything in one place.
How well do you know your JavaScript from your jQuery?
Check out SitePoint's latest JavaScript challenge
Bookmarks