Log in

View Full Version : Need help creating javascript code to auto populate web fields



starlette
09-10-2012, 07:34 AM
I am submitting online applications for work and VERY new to programming. Actually, I barely have any idea where to begin. :( Please excuse my lack of programming lingo in this post, I will try to describe things the best I can.

I have an Excel spreadsheet with customer's names, address, city, county, state, etc. and would like to figure out how to auto populate this information into separate fields on a webpage. It gets very tedious trying to copy-paste all this information for thousands of customers and would like to figure out an easier way.

Here is a sample application:
http://www.treasury.gov/initiatives/recovery/Documents/D%20Sample%20Application%20PIS.pdf
I need to fill in fields 2b, 2f (a), 4b, 4d, and 5a. I already have "Form Auto Filler" to fill in the bubbles for me.

This is how far I've gotten with my code (I don't even know if this is right) :confused:
javascript:document.getElementsByTagName('pname').value='A68';document.getElementsByTagName('paddr1').value='B68';document.getElementsByTagName('pcity').value=' C68';document.getElementsByTagName('pcounty').value='D68';document.getElementsByTagName('pzip').value='E68';

Since I do have this information on an Excel Spreadsheet, I am trying to figure out a way to have the cells automatically change the numbers as I drag the code down to the next row/customer's information (i.e. A68 to A69, B68 to B69, etc).

Ideally, I would paste this code into the internet address bar and VOILA, the fields should be filled.

Any suggestions, tips, guides, or programs would be very helpful. :-)

Thank you!

keyboard
09-10-2012, 11:42 PM
Please use the forum's bbcode tags to make your post more readable:

for php code............
<?php /* code goes here */ ?>
for html...............
<!-- markup goes here -->.....
for js/css/other.......
code goes here................

Just a quick suggestion, if you don't get any replies and you're willing, I'd suggest posting a request in the paid help forum... you'll probably get more responses there...

starlette
09-12-2012, 01:37 AM
I will try that! Thank you. :)