igotgame
03-15-2009, 11:17 AM
I am attempting to input cell A1 into a blank on a web page and that blank is within a table. Can someone help me here?
Here is the page source:
<html>
<head>
<TITLE></TITLE>
<script language="JavaScript" SRC="../js/browsercheck.js">
</script>
<script language="JavaScript">
var submitFlag = "Y"
function doInit() {
this.parent.user_grp = this.document.form1.wp_user_grp.value
this.parent.sec_admin = this.document.form1.wp_sec_admin.value
this.parent.svcr_fmly = this.document.form1.wp_svcr_fmly.value
this.parent.mi_co = this.document.form1.wp_mi_co.value
this.parent.outsrc_co = this.document.form1.wp_outsrc_co.value
this.parent.lan_user_id = this.document.form1.wp_lan_user_id.value
//alert("welcome.htm do init")
//alert(this.parent.svcr_fmly)
//alert(this.parent.user_grp)
}
</script>
<script language="JavaScript" SRC="../js/welcome.js">
</script>
<script language="JavaScript" SRC="../js/wp2common.js">
</script>
</HEAD>
<BODY BGCOLOR="#ffffff" VLINK="#fd0407" ALINK="#000ef3" onFocus="goBackElement(document.form1)" onLoad="doInit()">
<center>
<img src="../images/identifier100.gif">
<br>
<img SRC="../images/bar_red.gif" width="550">
</center>
<script language="JavaScript">
if (isBrowserSupported() == false) {
document.write(getBrowserWarningMessage());
}
</script>
<form action="/nwp/servlet/WpServlet" method="post" name="form1" target="_top"
onSubmit="return submit_form(this)" autocomplete="off">
<center>
<!--table border=1>
<tr>
<td><input type="radio" name="loanType" value="FM" onClick="" Checked onFocus="checkRule(this)"><B>Freddie Mac Loan</B>
<br>
<input type="radio" name="loanType" value="NFM" onClick="checkNonFM(document.form1)" onFocus="checkRule(this)"><B>Non Freddie Mac Loan</B>
</td>
</tr>
</table-->
<input type="hidden" name="loanType" value="FM"/>
<br>
<table border=1>
<tr>
<td>
<table border=0>
<tr>
<td>Freddie Mac Loan Number:</td>
<td><input type="text" name="wp_nbr_mrtg" size="15" maxlength="9"
onFocus="checkRule(this)" onChange="checkLoanNum(this)">
</td>
</tr>
<!--tr>
<td>Servicer Loan Number:</td>
<td><input type="text" name="wp_svcr_mrtg" size="15" maxlength="13" onFocus="checkRule(this)" onChange="checkLoanNum(this)"></td>
</tr-->
<tr>
<td>MI Certificate Number:</td>
<td><input type="text" name="wp_mi_cert_num" size="15" maxlength="10"
onFocus="checkRule(this)" onChange="checkLoanNum(this)">
</td>
</tr>
</table>
</td>
</tr>
</table>
</center>
<br><br>
<center>
<input type="submit" name="smit" value=" Enter "
onFocus="checkRule(this)">
</center>
<!-- Hidden object -->
<input type="hidden" name="WP_FORM_SUBMITTED" value="FALSE">
<input type="hidden" name="wp_user_grp" value="DELEGATED">
<input type="hidden" name="wp_svcr_fmly" value="621406">
<input type="hidden" name="wp_lan_user_id" value="norjk4">
<input type="hidden" name="wp_mi_co" value="">
<input type="hidden" name="wp_outsrc_co" value="">
<input type="hidden" name="wp_sec_admin" value="N">
<input type="hidden" name="status_msg" value="">
<input type="hidden" name="LOGON_SCREEN">
<input type="HIDDEN" NAME="SCREEN" value="BorrInfo" >
<input type="HIDDEN" NAME="FRAME" value="PARENT" >
<input type="HIDDEN" NAME="RQ_LOAN" value="FALSE" >
<input type="HIDDEN" NAME="wp_loan" value="" >
</form>
</body>
</html>
What I want to do is enter a # from cell A1 in my spreadsheet into this area on the page:
<td>Freddie Mac Loan Number:</td>
<td><input type="text" name="wp_nbr_mrtg" size="15" maxlength="9"
onFocus="checkRule(this)" onChange="checkLoanNum(this)">
</td>
but that blank is inside of a table and I don't know how to get it to put the number there.
I tried something like:
Set doc = appIE.Document
Set htmlColl = doc.getElementsByTagName("INPUT")
For Each htmlInput In htmlColl
If htmlInput.Name = "wp_nbr_mrtg" Then _
htmlInput.Value = Workbooks(1).Worksheets(1).Range("A1")
but that didn't work
Any ideas?
Here is the page source:
<html>
<head>
<TITLE></TITLE>
<script language="JavaScript" SRC="../js/browsercheck.js">
</script>
<script language="JavaScript">
var submitFlag = "Y"
function doInit() {
this.parent.user_grp = this.document.form1.wp_user_grp.value
this.parent.sec_admin = this.document.form1.wp_sec_admin.value
this.parent.svcr_fmly = this.document.form1.wp_svcr_fmly.value
this.parent.mi_co = this.document.form1.wp_mi_co.value
this.parent.outsrc_co = this.document.form1.wp_outsrc_co.value
this.parent.lan_user_id = this.document.form1.wp_lan_user_id.value
//alert("welcome.htm do init")
//alert(this.parent.svcr_fmly)
//alert(this.parent.user_grp)
}
</script>
<script language="JavaScript" SRC="../js/welcome.js">
</script>
<script language="JavaScript" SRC="../js/wp2common.js">
</script>
</HEAD>
<BODY BGCOLOR="#ffffff" VLINK="#fd0407" ALINK="#000ef3" onFocus="goBackElement(document.form1)" onLoad="doInit()">
<center>
<img src="../images/identifier100.gif">
<br>
<img SRC="../images/bar_red.gif" width="550">
</center>
<script language="JavaScript">
if (isBrowserSupported() == false) {
document.write(getBrowserWarningMessage());
}
</script>
<form action="/nwp/servlet/WpServlet" method="post" name="form1" target="_top"
onSubmit="return submit_form(this)" autocomplete="off">
<center>
<!--table border=1>
<tr>
<td><input type="radio" name="loanType" value="FM" onClick="" Checked onFocus="checkRule(this)"><B>Freddie Mac Loan</B>
<br>
<input type="radio" name="loanType" value="NFM" onClick="checkNonFM(document.form1)" onFocus="checkRule(this)"><B>Non Freddie Mac Loan</B>
</td>
</tr>
</table-->
<input type="hidden" name="loanType" value="FM"/>
<br>
<table border=1>
<tr>
<td>
<table border=0>
<tr>
<td>Freddie Mac Loan Number:</td>
<td><input type="text" name="wp_nbr_mrtg" size="15" maxlength="9"
onFocus="checkRule(this)" onChange="checkLoanNum(this)">
</td>
</tr>
<!--tr>
<td>Servicer Loan Number:</td>
<td><input type="text" name="wp_svcr_mrtg" size="15" maxlength="13" onFocus="checkRule(this)" onChange="checkLoanNum(this)"></td>
</tr-->
<tr>
<td>MI Certificate Number:</td>
<td><input type="text" name="wp_mi_cert_num" size="15" maxlength="10"
onFocus="checkRule(this)" onChange="checkLoanNum(this)">
</td>
</tr>
</table>
</td>
</tr>
</table>
</center>
<br><br>
<center>
<input type="submit" name="smit" value=" Enter "
onFocus="checkRule(this)">
</center>
<!-- Hidden object -->
<input type="hidden" name="WP_FORM_SUBMITTED" value="FALSE">
<input type="hidden" name="wp_user_grp" value="DELEGATED">
<input type="hidden" name="wp_svcr_fmly" value="621406">
<input type="hidden" name="wp_lan_user_id" value="norjk4">
<input type="hidden" name="wp_mi_co" value="">
<input type="hidden" name="wp_outsrc_co" value="">
<input type="hidden" name="wp_sec_admin" value="N">
<input type="hidden" name="status_msg" value="">
<input type="hidden" name="LOGON_SCREEN">
<input type="HIDDEN" NAME="SCREEN" value="BorrInfo" >
<input type="HIDDEN" NAME="FRAME" value="PARENT" >
<input type="HIDDEN" NAME="RQ_LOAN" value="FALSE" >
<input type="HIDDEN" NAME="wp_loan" value="" >
</form>
</body>
</html>
What I want to do is enter a # from cell A1 in my spreadsheet into this area on the page:
<td>Freddie Mac Loan Number:</td>
<td><input type="text" name="wp_nbr_mrtg" size="15" maxlength="9"
onFocus="checkRule(this)" onChange="checkLoanNum(this)">
</td>
but that blank is inside of a table and I don't know how to get it to put the number there.
I tried something like:
Set doc = appIE.Document
Set htmlColl = doc.getElementsByTagName("INPUT")
For Each htmlInput In htmlColl
If htmlInput.Name = "wp_nbr_mrtg" Then _
htmlInput.Value = Workbooks(1).Worksheets(1).Range("A1")
but that didn't work
Any ideas?