Quantcast
Channel: HTML & Web Page Design – Ask Dave Taylor
Viewing all articles
Browse latest Browse all 46

Add Veterans Affairs search engine to my Web site?

$
0
0
add a us department of veterans affairs va.gov search box html source form

First off, thanks for your service. Much appreciated, both you and every other vet who has served our country in whatever capacity. And you’re right, the US Department of Veterans Affairs has been working on creating better online resources, but it is a bit of a maze trying to figure out where to turn for specific help.

Identifying specific areas of assistance and offering tutorials on how to figure out how to, for example, get college benefits, medical help, or even burial benefits can be daunting and if you’re not already familiar with computers and the Web, it can be overwhelming.

So props to you for building a new site to offer another path for vets to find the benefits, help and information they seek. The more, the merrier.

I’m happy to show you how to embed the VA.GOV search engine on your own page too, but let me step through the process rather than just list some HTML code.

To start, here’s the VA.GOV home page, with the search box shown:

department of veterans affairs web site va.gov

You can see that the areas they have found are most important to visitors are health, benefits, burials & memorials, suicide prevention, national cemetery administration, the veterans choice program and the personalized version of the VA site called “MyVA”. That should help you figure out what areas you should include too.

To reverse engineer the search, let’s actually do a search for “college tuition“. The results of the search are:

results of college tuition benefits search, va.gov veterans affairs

All good, but what’s important is to look at the URL in the address bar of the browser to see how the VA.GOV site sends the search query:

department of veterans affairs, search engine URL

There’s a lot going on, but with a bit of experimentation, it turns out that just about all of it is irrelevant: the far simpler search URL below produces identical results on the site:

simplified department of veterans affairs search url

Now we’re getting somewhere, because to build a search box all we need to know is the variable used for the search term (in this case you can see it’s “QT“) and the URL of the page that receives that URL and actually processes the search (here it’s “http://www.index.va.gov/search/va/va_search.jsp”).

Armed with that information, here’s the most rudimentary search box, in HTML:

<form method=”GET” action=”http://www.index.va.gov/search/va/va_search.jsp”>
<input type=”text” name=”QT” />
<input type=”submit” />
</form>

To turn that into an actual search box on a Web page, enter it as HTML source:

Not too complicated, is it? Now let’s add some CSS pizazz so it’s a bit more visually attractive, starting with a box around the entire search, a very light blue background and, of course, a prompt explaining what it is. Oh and let’s have it open in a separate window too by adding target= to the first line:

<form method=”get” action=”http://www.index.va.gov/search/va/va_search.jsp” target=”_blank” style=”border:1px solid black;background-color:#eef;padding:10px;width:500px;”>
Search the Department of Veterans Affairs:
<input type=”text” name=”QT” />
<input type=”submit” value=”Search” />
</form>

And rendered it looks like:

Search the Department of Veterans Affairs:

Definite improvement! Try it, by the way, see what happens.

There’s lots more you can do to get this form to appear exactly as you desire, but I hope this will get you on the right track. Good luck, and I hope your site proves a great resource for fellow vets.

Also, note that since you now understand how the search URLs are formed, you can also add links to your own page that are predefined searches too. Write about veterans benefits with college costs? A predefined search for college benefits on the VA site can be as simple as a link to http://www.index.va.gov/search/va/va_search.jsp?QT=college+benefits with the appropriate word or two (or graphic) shown.

The post Add Veterans Affairs search engine to my Web site? appeared first on Ask Dave Taylor.


Viewing all articles
Browse latest Browse all 46

Trending Articles