Hi All,
I'm not too proficient in Javascript but am trying to help a friend
out. Bascially, the page we are having trouble with is loaded with a
numerical value in the url string. Example:
I then parse the string to get the total. I then want to assign the
value to a hidden form value
(document.form1 .FeeCalcTotalDe cimal.value) The hidden value is to be
used to post to a bank's website.
I'm sure this is just a syntax issue, but I'm stumped. Keep getting
"document.form1 .FeeCalcTotalDe cimal.value is null or not an object."
<CODE>
<script language="JavaS cript">
function parseGetVars() {
var getVars = new Array();
var qString = unescape(top.lo cation.search.s ubstring(1));
var pairs = qString.split(/\&/);
for (var i in pairs) {
var nameVal = pairs[i].split(/\=/);
getVars[nameVal[0]] = nameVal[1];
}
return getVars;
}
</script>
<script>
var g = parseGetVars();
for (var i in g)
document.writel n('Your total fee is $' +g[i]+'<br>');
document.form1. FeeCalcTotalDec imal.value = '+g[i]+' ; THIS ISN'T
WORKING!!
</script>
<br />
</font</div>
<table width="715" height="52" border="0">
<tr>
<td align="center" width="374" height="48"<for m
name="form1" method="post" action="https://secure.linkpt.n et/lpcentral/
servlet/lppay">
<input type="hidden" name="txntype" value="sale">
<input type="hidden" name="storename " value="10011848 58">
<INPUT type="hidden" name="chargetot al"
value="FeeCalcT otalDecimal">
<input type="hidden" name="suppressT itle" value="true">
<input name="Submit" type="submit" id="Submit" value="Submit">
</td>
<td width="331">
</div>
</form></td>
</tr>
</table>
</CODE>
Thanks in advance for your help!
JCC
I'm not too proficient in Javascript but am trying to help a friend
out. Bascially, the page we are having trouble with is loaded with a
numerical value in the url string. Example:
I then parse the string to get the total. I then want to assign the
value to a hidden form value
(document.form1 .FeeCalcTotalDe cimal.value) The hidden value is to be
used to post to a bank's website.
I'm sure this is just a syntax issue, but I'm stumped. Keep getting
"document.form1 .FeeCalcTotalDe cimal.value is null or not an object."
<CODE>
<script language="JavaS cript">
function parseGetVars() {
var getVars = new Array();
var qString = unescape(top.lo cation.search.s ubstring(1));
var pairs = qString.split(/\&/);
for (var i in pairs) {
var nameVal = pairs[i].split(/\=/);
getVars[nameVal[0]] = nameVal[1];
}
return getVars;
}
</script>
<script>
var g = parseGetVars();
for (var i in g)
document.writel n('Your total fee is $' +g[i]+'<br>');
document.form1. FeeCalcTotalDec imal.value = '+g[i]+' ; THIS ISN'T
WORKING!!
</script>
<br />
</font</div>
<table width="715" height="52" border="0">
<tr>
<td align="center" width="374" height="48"<for m
name="form1" method="post" action="https://secure.linkpt.n et/lpcentral/
servlet/lppay">
<input type="hidden" name="txntype" value="sale">
<input type="hidden" name="storename " value="10011848 58">
<INPUT type="hidden" name="chargetot al"
value="FeeCalcT otalDecimal">
<input type="hidden" name="suppressT itle" value="true">
<input name="Submit" type="submit" id="Submit" value="Submit">
</td>
<td width="331">
</div>
</form></td>
</tr>
</table>
</CODE>
Thanks in advance for your help!
JCC
Comment