How would I

Hey everyone,

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,

Any help would be much appreciated,


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

Thanks for the fast reply Pullo!

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!


No probs :slight_smile:

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:

This seems like it might be a fun project, so let me know if you have any questions.

Cheers Pullo :slight_smile:

I love the idea of the auto-complete, that would make the task for the end user alot less painful.

I’ll give an example of what I want the page to display as I’m shocking at trying to explain things…

If a user encounters an error code, I want to direct them to a webpage which would contain a text box,

They then enter a code, for example H5-01

Once they press submit, they are taken to a webpage which would have instructions on how to clear and resolve the code.

I was just going to list a table of error codes and there resolutions, but this isnt fun enough :wink:

Thanks again

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.

I better get leaning PHP and all about databases…this hobby just gets more in depth every day.

I finally thought I was getting somewhere after three months, but looks like I havent even scratched the surface!

Thanks for the help and I’ll report back with the finished product (probably sometime in 2014 :D)