As an Army Vet, I know how hard it can be for people to find the right online resources when they’re in need. I’ve been building a Web site to help, and would like to embed the DVA search box on my page. Is that possible?
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:
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:
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:
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:
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:
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:
And rendered it looks like:
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.