hey all,

I am trying to do something that is clearly out of my skill level! I am attempting to hit a page that has a form (the page is hosted by someone else), fill it out with premade values and submit the form with code, and then pull some data from the resulting HTML page. The first part of this works great, but I can not figure out how to get the data from the resulting page. The data on that page is taged with id values. My code for opening the window, filling out and submitting the form is the following:

<SCRIPT language="JavaScript">
function submitform(){return("<body onload='document.calc.submit()'><form action='http://www.ssa.gov/cgi-bin/benefit6.cgi' method='post' name='calc' id='calc'><input type='hidden' name='dobmon' id='month' size='2' maxlength='2' value='12'><input type='hidden' name='dobday' id='day' size='2' maxlength='2' value='1'><input type='hidden' name='yob' id='year' size='4' maxlength='4' value='1975'><input type='hidden' name='earnings' id='earnings' size='7' maxlength='7' value='40000'><input type='hidden' name='lastYearEarn' id='lastyear' size='4' maxlength='4' value=''><input type='hidden' name='lastEarn' id='lastearnings' size='7' maxlength='7' value=''><input type='hidden' name='retiremonth' id='retiremonth' size='2' maxlength='2' value='12'><input type='hidden' name='retireyear' id='retireyear' size='4' maxlength='4' value='2020'><input type='hidden' name='dollars' id='constant' value='1' checked='checked'><input type='hidden' name='dollars' id='nominal' value='0'><input type='hidden' name='prgf' value='2'>");
var newWin = open("", "win", "width=900,height=900");
var newDoc = newWin.document;

My thought was that I could simply use the newDoc object and getElementById to pull out the data I need, but it doesn't seem to work. Any thoughts or suggestions?

Thanks in advance!