Solved

# Problem with ColdFusion Shopping Cart

Posted on 2003-12-04
516 Views
I have a small problem, I have a CF shopping cart and it's working correctly. Now I have to add a donation part to the shopping cart, just in case the buyer feels a little generous and wants to donate more money to the church. I need to have a JavaScript that could update the total amount on the fly (if someone added a donation) the total amount is being calculated correclty with CF. Please Advise.

take a look at www.provisionnetwork.com/newside/onlinestore.cfm

0
Question by:visa1234_12
• 5
• 2
• 2

LVL 25

Expert Comment

ID: 9877676
can you clarify how you want the calculation to be done and give the compiled source code from the page(s) in which you want to have the calculation .

0

Author Comment

ID: 9877882
When I click on checkout/view cart I have the option of adding/giving more money to the church(www.provisionnetwork.com/newside/onlinestore.cfm). So when I type any amount in the donation text box, I would like the total amount to include the donation amount on the fly (i tried onblur function, and it doesn't work). the total amount currently is being calculated based on the price, quantity, and shipping cost of the product(s). I would like that total to change based on the donation (if any) amount.
0

LVL 25

Expert Comment

ID: 9877942
there is no where on that page to enter a value, you need to provide the actual page on w2hich the calculation needs to be performed
0

Author Comment

ID: 9877980
after click www.provisionnetwork.com/newside/onlinestore.cfm click on any item and add it to the basket, then click on view cart, and you'll see what i mean.
0

LVL 25

Accepted Solution

James Rodgers earned 250 total points
ID: 9878167
this works...

you will need to cahnge your javascipt to

function CalMath(lValue) {
eval(document.forms[1].elements['totalSale'].value)
document.forms[1].elements['totalSale'].value =eval(document.forms[1].elements['totalSale'].value)+eval(lValue);
}

and the line that shows the total to this

<tr bgcolor="3C5904">
<td colspan="2" align="center"><FONT SIZE="2" class="BodyText" color="FFFFFF"><strong><font color="FFFFFF"> Total : &nbsp;&nbsp;</FONT></strong></FONT></td>

<td align="right" width="80" style="color:white" nowrap>\$<input type="text" size="8" name="totalSale" value="15.85" style="border:0; background:3C5904; color:white; align:right;" readonly></td>
</tr>

<STYLE>
.itemBorder {BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-BOTTOM: black 1px solid}
.itemText {      FONT: 9px Verdana,Arial, Helvetica; COLOR: #FFFFFF; TEXT-DECORATION: none}
.mainText {      FONT: 11px Verdana,Arial, Helvetica; COLOR: #ffffff; TEXT-DECORATION: none}
.ContText {      FONT: 11px Verdana,Arial, Helvetica; COLOR: #000000; TEXT-DECORATION: none}
.ContentText { FONT: 12px Verdana,Arial, Helvetica; COLOR: #000000; TEXT-DECORATION: none}
.crazyBorder { BORDER-RIGHT: #663399 1px outset; BORDER-TOP: #663399 1px outset; BORDER-LEFT: #663399 1px outset; BORDER-BOTTOM: #663399 1px outset}
.crazyText { FONT: bold 10px Verdana,Arial, Helvetica; COLOR: #ffffff; TEXT-DECORATION: none}
.call      {font-family:arial,san-serif;font-size:10px;text-decoration:none;}
.snu      {font-family:arial,san-serif; color=#ffffff;font-size:11px;text-decoration:none;}
.bttn      {border-style:outset;font-size:11px;border-color:#3C5904;border-width:2px;background-color:#3C5904;}
</STYLE>

<HTML>
<TITLE>ProVision Network</TITLE>
<SCRIPT>
<!--
//-->
</SCRIPT>
<SCRIPT LANGUAGE="JavaScript1.2">
<!--
// Handles rollover images for NN3+ and IE4+

if (image && image.src &&
(null == image.out || typeof(image.out) == typeof(void(0)))) {
s = image.src;
image.out = new Image();
image.out.src = s;
image.over = new Image();
if (imageName.lastIndexOf('/') >= 0 || imageName.lastIndexOf('\\') >= 0) {
s = imageName;
} else {
i = s.lastIndexOf('/');
if (i<0) i = s.lastIndexOf('\\');
if (i<0) { s = imageName; }
else       { s = s.substring(0,i+1) + imageName; }
}
image.over.src = s;
}
}
function F_roll(imageName,over) {
if (document.images) {
if (over) { imageObject = "over"; }
else        { imageObject = "out"; }
if (image) {
ref = eval("image."+imageObject);
if (ref) image.src = eval("image."+imageObject+".src");
else image.src = '';

if (ref)
{
if (over)
else
}
}
if (window.event)
window.event.cancelBubble = true;
}
}

{
v = b.offsetLeft;
if (b.offsetParent)
return v;
}

{
v = b.offsetTop;
if (b.offsetParent)
return v;
}

{

else if (document.layers)
else

{
{
if (document.layers)
else
}
else
{
return;
}
}

var horizontal = a[2];

if (document.layers)
{
}
else
{

if (horizontal)
else

}

}

{
}

{
{
if (document.layers)
else
}
}

{
var navname = a[0];
var s;

var i = 1;
while (i < a.length)
{
var target = '';
if (p != -1)
{
}
s += '<tr><td width="100%">';
s += '<a href="' + link + '"';
if (target.length)
s += ' target="' + target + '"';
if (a[i + 2].length)
s += ' onMouseOver="F_rolls(\'' + navname + 's' + i + '\',1)" onMouseOut="F_rolls(\'' + navname + 's' + i + '\',0)"';
s += '>';
s += '<img border="0" src="' + a[i + 1] + '"';
if (a[i + 2].length)
s += ' name=\'' + navname + 's' + i + '\' onLoad="F_loadRollover(this,\'' + a[i + 2] + '\',0)"';
s += '>';
s += '</a></td></tr>';
i += 3;
}
s += '</table>';

{
document.writeln("<DIV ID='" + navname + "LYR' STYLE='Z-Index:5'>");
document.writeln(s);
document.writeln("</DIV>");
}
{
document.writeln("<DIV ID='" + navname + "LYR'>");
document.writeln(s);
document.writeln("</DIV>");
}
else if (document.all)
{
document.writeln("<DIV ID='" + navname + "LYR' STYLE='Z-Index:5'>");
document.writeln(s);
document.writeln("</DIV>");
}
else if (document.layers)
{
}
}

{
}

{
}

function F_rolls(imageName,over)
{
if (over)
else

F_roll(imageName,over);
}
-->
</SCRIPT>
<NOLAYER>
<STYLE ID="NOF_STYLE_SHEET">
<!--
DIV#NavigationBar21LYR { position:absolute; visibility:hidden; top:0; left:0; z-index:1; }
DIV#NavigationBar22LYR { position:absolute; visibility:hidden; top:0; left:0; z-index:1; }
DIV#NavigationBar23LYR { position:absolute; visibility:hidden; top:0; left:0; z-index:1; }
DIV#NavigationBar24LYR { position:absolute; visibility:hidden; top:0; left:0; z-index:1; }
-->
.input {margin:1px;
color:#000033;
font-family:font-family: Arial, Helvetica, sans-serif;
font-size:10px;
font-weight:normal;
background-color:#F9EB8A;
border-style: solid;
BORDER-TOP: black solid 1px;
BORDER-LEFT: black solid 1px;
BORDER-RIGHT: black solid 1px;
BORDER-BOTTOM: black solid 1px;   }

.searchinput {margin:1px;
color:#FFFFFF;
font-family:font-family: Arial, Helvetica, sans-serif;
font-size:12px;
font-weight:normal;
background-color:#3c5904;
border-style: solid;
BORDER-TOP: black solid 1px;
BORDER-LEFT: black solid 1px;
BORDER-RIGHT: black solid 1px;
BORDER-BOTTOM: black solid 1px;   }
.InputText {
FONT-FAMILY: geneva, arial, sans-serif;
FONT-SIZE: 10px;
MARGIN: 0in 0in 3px;
COLOR: #000099;
LINE-HEIGHT: 15px}

.InputTextRed {
FONT-FAMILY: geneva, arial, sans-serif;
FONT-SIZE: 10px;
MARGIN: 0in 0in 3px;
COLOR: #FF0000;
LINE-HEIGHT: 15px}

.BodyText {
FONT-FAMILY: geneva, arial, sans-serif;
FONT-SIZE: 11px;
MARGIN: 0in 0in 3px;
COLOR: #000099;
LINE-HEIGHT: 15px
}
.BodyText1 {
FONT-FAMILY: geneva, arial, sans-serif;
FONT-SIZE: 12px;
MARGIN: 0in 0in 3px;
COLOR: #000099;
LINE-HEIGHT: 15px
}
.BodyText2 {
FONT-FAMILY: geneva, arial, sans-serif;
FONT-SIZE: 12px;
MARGIN: 0in 0in 3px;
COLOR: #800000;
LINE-HEIGHT: 15px
}
FONT-FAMILY: Arial, Helvetica, sans-serif;
FONT-SIZE: 17px;
MARGIN: 0in 0in 3px;
COLOR: #000099;
LINE-HEIGHT: 15px
}
.BannerText {
font-family:font-family: Arial, Helvetica, sans-serif;
FONT-SIZE: 16px;
MARGIN: 0in 0in 3px;
COLOR: #FF0000;
font-weight:bold;
LINE-HEIGHT: 16px
}

.BodyTextRed {
FONT-FAMILY: geneva, arial, sans-serif;
FONT-SIZE: 11px;
MARGIN: 0in 0in 3px;
COLOR: #FF0000;
LINE-HEIGHT: 15px
}
FONT-FAMILY: geneva, arial, sans-serif;
FONT-SIZE: 16px;
MARGIN: 0in 0in 3px;
COLOR: #000099;
LINE-HEIGHT: 15px
}
FONT-FAMILY: geneva, verdana, arial, sans-serif;
FONT-SIZE: 11px;
LINE-HEIGHT: 15px;
COLOR: #3c5904;
}
bodyText1{ color:black;
font-family:Arial;
font-size:13px;
font-weight:normal;}

A:link    { COLOR: blue; TEXT-DECORATION: underline; font-weight: normal }
A:visited { COLOR: red; TEXT-DECORATION: underline; font-weight: normal }
A:active  { COLOR: red; TEXT-DECORATION: underline }
A:hover   { COLOR: red; TEXT-DECORATION: none; font-weight: normal ;text-decoration:underline}

/* A:hover   { COLOR: red; TEXT-DECORATION: none; font-weight: normal }

COLOR: #3c5904
}

A:active {
COLOR: #3c5904
}

A:visited {
COLOR: #3c5904
}

.leftnav {
FONT-WEIGHT: bold;
FONT-SIZE: 10px;
LINE-HEIGHT: 14px
}

COLOR: #3c5904; TEXT-DECORATION: none
}

A.bluetitle:active {
COLOR: #3c5904; TEXT-DECORATION: none
}

A.bluetitle:visited {
COLOR: #3c5904; TEXT-DECORATION: none
}

A.bluetitle:hover {
COLOR: #3c5904; TEXT-DECORATION: none
}
A:hover {
COLOR: #3c5904
} */--->
</STYLE>
</NOLAYER>
<BODY TOPMARGIN=0 LEFTMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
<TABLE width="804" BORDER="0" CELLPADDING="0" CELLSPACING="0" NOF=TE>
<TR><TD colspan="3"><IMG SRC="../Images/newbanner.jpg" width="803" height="80" BORDER=0 ALT=""></TD></TR>
<TR><TD colspan="3"><IMG SRC="../Images/NewImages/autogen/clearpixel.gif" WIDTH=11 HEIGHT=1 BORDER=0 ALT=""></TD></TR>
<TR ALIGN=LEFT>
<TD COLSPAN=3 valign="top">
<TR>
<TD ALIGN=CENTER VALIGN=MIDDLE WIDTH=23><a href="../NewSide/Index.cfm"><IMG ID="Picture4" HEIGHT=24 WIDTH=23 SRC="../Images/NewImages/smallinsert.gif" BORDER=0 ALT=""></a></TD>

</TR>
</TABLE>

</TD>
</TR>
<TR><TD colspan="3"><IMG SRC="../Images/NewImages/autogen/clearpixel.gif" WIDTH=11 HEIGHT=1 BORDER=0 ALT=""></TD></TR>
<TR ALIGN="LEFT">
<TD BGCOLOR="#3C5904" width="133" valign="middle" align="left">
<a href="../NewSide/Enrollment.cfm"><img src="../Images/pvnmemberanimgif.gif" width="133" height="40" alt="" border="0"></a>
</TD>
<TD valign="middle" align="center" >

<img src="../Images/banner/ProVision.gif" alt="ProVision Network" border="0">

</TD>
<TD BGCOLOR="#3C5904" width="174" align="center" valign="middle">
<table align="center">
<tr>
<td><a href="../career/job_search.cfm"><img src="../Images/resumes2.jpg" alt="" border="0"></a>
</td>
</tr>
</table>

</TD>
</TR>

<TR ALIGN=LEFT>
<TD WIDTH="133" BGCOLOR="#3C5904" valign="top">
<TR VALIGN=TOP ALIGN=LEFT>
</TR>
<TR VALIGN=TOP ALIGN=LEFT>
</TR>
<TR VALIGN=TOP ALIGN=LEFT>
</TR>
<TR VALIGN=TOP ALIGN=LEFT>
</TR>
<TR VALIGN=TOP ALIGN=LEFT>
<TD WIDTH=130 HEIGHT=24>&nbsp;</TD>
</TR>
<TR VALIGN=TOP ALIGN=LEFT>
</TR>
<TR VALIGN=TOP ALIGN=LEFT>
</TR>
<TR VALIGN=TOP ALIGN=LEFT>
</TR>
<TR VALIGN=TOP ALIGN=LEFT>
<TD WIDTH=130 HEIGHT=24>&nbsp;</TD>
</TR>
<TR VALIGN=TOP ALIGN=LEFT>
</TR>
<TR VALIGN=TOP ALIGN=LEFT>
</TR>
<TR VALIGN=TOP ALIGN=LEFT>
</TR>
<TR VALIGN=TOP ALIGN=LEFT>
</TR>
<TR VALIGN=TOP ALIGN=LEFT>
<TD WIDTH=130 HEIGHT=24>&nbsp;</TD>
</TR>
<TR VALIGN=TOP ALIGN=LEFT>
<TD WIDTH=130 HEIGHT=24>&nbsp;</TD>
</TR>
<TR VALIGN=TOP ALIGN=LEFT>
</TR>
<TR VALIGN=TOP ALIGN=LEFT>
</TR>
<TR VALIGN=TOP ALIGN=LEFT>
</TR>
<TR VALIGN=TOP ALIGN=LEFT>
<TD WIDTH=130 HEIGHT=24>&nbsp;</TD>
</TR>
<TR VALIGN=TOP ALIGN=LEFT>
</TR>
<TR VALIGN=TOP ALIGN=LEFT>
</TR>
<TR VALIGN=TOP ALIGN=LEFT>
</TR>
<TR VALIGN=TOP ALIGN=LEFT>
<TD WIDTH=130 HEIGHT=24>&nbsp;</TD>
</TR>
<TR VALIGN=TOP ALIGN=LEFT>
</TR>
<TR VALIGN=TOP ALIGN=LEFT>
</TR>
<TR VALIGN=TOP ALIGN=LEFT>
</TR>
<TR VALIGN=TOP ALIGN=LEFT>
</TR>
<TR VALIGN=TOP ALIGN=LEFT>
<TD WIDTH=130 HEIGHT=24>&nbsp;</TD>
</TR>
<TR VALIGN=TOP ALIGN=LEFT>
<TD WIDTH=130 HEIGHT=24><a href="../NewSide/MYAccounts.cfm"><img src="../Images/NewImages/autogen/UpdateProfile.gif" width="130" height="24" alt="" border="0"></a></TD>
</TR>
<TR VALIGN=TOP ALIGN=LEFT>
<TD WIDTH=130 HEIGHT=24>&nbsp;</TD>
</TR>
<TR VALIGN=TOP ALIGN=LEFT>
<TD WIDTH=130 HEIGHT=24 align="center"><a href="http://www.amazon.com/exec/obidos/redirect/?path=tg/browse/-/465600&tag=provisionnetw-20"><img src="../Images/sot-120x150.gif" border="0"></a></A></TD>
</TR>
</TABLE>

</TD>
<TD width="497" valign="top" >

<SCRIPT LANGUAGE="JavaScript">
<!--

function RemonRules() {
return confirm(" Are you sure you want to Delete this Item? ");
}

// -->
</SCRIPT>

<SCRIPT LANGUAGE="JavaScript">
<!--

function CalMath(lValue) {
eval(document.forms[1].elements['totalSale'].value)
document.forms[1].elements['totalSale'].value =eval(document.forms[1].elements['totalSale'].value)+eval(lValue);
}

// -->
</SCRIPT>

<TR><TD align="center"><img src="../Images/banline.gif" alt="" border="0"></TD></TR>
<tr>
<td valign="top">

<table width="100%">
<tr><td><FONT SIZE="2" class="BodyText">&nbsp;</FONT></td></tr>
<tr><td><FONT SIZE="2" class="BodyText">Your order will be sent by mail within 5 to 7 days of payment received and confirmed.</FONT></td></tr>
<tr><td><FONT SIZE="2" class="BodyText">&nbsp;</FONT></td></tr>
<tr>
<td>
<table border="0" cellpadding=3 cellspacing=0 width="100%" align="center">
<tr bgcolor="3C5904">
<td align="center"><FONT SIZE="2" class="BodyText" color="FFFFFF"><strong><font color="FFFFFF">Item</font></strong></FONT></td>
<td align="center"><FONT SIZE="2" class="BodyText" color="FFFFFF"><strong><font color="FFFFFF">Short Description</font></strong></FONT></td>

<td align="center"><FONT SIZE="2" class="BodyText" color="FFFFFF"><strong><font color="FFFFFF">Qty</font></strong></FONT></td>
<td align="center"><FONT SIZE="2" class="BodyText" color="FFFFFF"><strong><font color="FFFFFF">Price</font></strong></FONT></td>
<td align="center"><FONT SIZE="2" class="BodyText" color="FFFFFF"><strong><font color="FFFFFF">Extended</font></strong></FONT></td>
<td align="center"><FONT SIZE="2" class="BodyText" color="FFFFFF"><strong><font color="FFFFFF">Update</font></strong></FONT></td>
<td align="center"><FONT SIZE="2" class="BodyText" color="FFFFFF"><strong><font color="FFFFFF">Delete</font></strong></FONT></td>
</tr>
<tr><td colspan="9">&nbsp;</td></tr>

<form action="PVNShopCart.cfm" name="ShopCarts2" method="post">
<input type="Hidden" name="SCNumID" value="601">
<tr>

<td><FONT SIZE="2" class="BodyText">1 </FONT></td>
<td><FONT SIZE="2" class="BodyText">The ProVision Network Hand Book</FONT></td>

<td align="center"><FONT SIZE="2" class="BodyText"><input type="text" name="prod_qty" value="1" size="8"></FONT></td>
<td><FONT SIZE="2" class="BodyText">\$12.00</FONT></td>
<td align="right"><FONT SIZE="2" class="BodyText">\$12.00</FONT></td>
<td align="center"><FONT SIZE="2" class="BodyText">
<input type="submit" name="Update" value="Update">
<INPUT TYPE="hidden" NAME="go" VALUE="upd">
</td>
<td align="center"><FONT SIZE="2" class="BodyText"><a href="PVNShopCart.cfm?SCNumID=601&go=1" onClick="return RemonRules()"><b>Delete</b></a></td>
</tr>
</form>

</table>
</td>
</tr>
<tr><td><FONT SIZE="2" class="BodyText">&nbsp;</FONT></td></tr>
<tr><td align="center"><FONT SIZE="2" class="BodyText">To Change the Quantity of an item, Please click the "Update" button for that item.</FONT></td></tr>
<tr><td><FONT SIZE="2" class="BodyText">&nbsp;</FONT></td></tr>
<tr>
<td>
<table border="0" cellpadding=1 cellspacing=0 width="100%" align="center">
<tr>
<td width="60%">

&nbsp;
</td>
<td>
<table border="1" cellpadding=1 cellspacing=0 width="100%" align="center">

<form action="PVNShopCart.cfm" name="ShopCarts" method="post">
<tr>
<td width="170"><FONT SIZE="2" class="BodyText"><strong>SubTotal : &nbsp;&nbsp;</strong></FONT></td>

<td><FONT SIZE="2" class="BodyText">&nbsp;&nbsp;&nbsp;1&nbsp;&nbsp;&nbsp;</FONT></td>
<td align="right" width="80"><FONT SIZE="2" class="BodyText">\$12.00</FONT></td>
</tr>

<tr>

<td colspan="2" align="center">
<FONT SIZE="2" class="BodyText">Shipping & Handling

</FONT>
</td>
<td align="right" width="80"><FONT SIZE="2" class="BodyText">\$3.85</FONT></td>
</tr>

<tr bgcolor="3C5904">
<td colspan="2" align="center"><FONT SIZE="2" class="BodyText" color="FFFFFF"><strong><font color="FFFFFF"> Donations : &nbsp;&nbsp;</FONT></strong></FONT></td>

<td align="right" width="80"><input type="Text" name="Donation" size="8" maxlength="8" onblur="CalMath(this.value);"></td>
</tr>

<tr bgcolor="3C5904">
<td colspan="2" align="center"><FONT SIZE="2" class="BodyText" color="FFFFFF"><strong><font color="FFFFFF"> Total : &nbsp;&nbsp;</FONT></strong></FONT></td>

<td align="right" width="80" style="color:white" nowrap>\$<input type="text" size="8" name="totalSale" value="15.85" style="border:0; background:3C5904; color:white; align:right;" readonly></td>
</tr>

</table>
</td>
</tr>
</table>
</td>
</tr>

<tr><td align="right"><FONT SIZE="2" class="BodyText"><input type="Button" value="Continue Shopping" onclick="window.location.href='OnlineStore.cfm'">&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type="submit" name="Checkout" value="Check Out"></FONT></td></tr>
</form>
</table>

</td>
</table>
</TD>
<TD WIDTH="174" BGCOLOR="#3C5904" align="center" valign="top">&nbsp;
<TR>
<TD WIDTH=174>
<TABLE WIDTH="100%" BORDER=0 CELLSPACING=0 CELLPADDING=0 NOF=TE>
<TR>
<td>&nbsp;&nbsp;</td>
<td align="left" valign="middle" width="28"><a href="../NewSide/audiolibrary.cfm"><img src="../Images/speaker.gif" border="0" alt="ProVision Network Autio's"></a></td>
<td>&nbsp;&nbsp;</td>
<TD ALIGN="left"><a href="../NewSide/audiolibrary.cfm"><font class="BodyHead"><font color="#ffffff"><strong>Audio Library</strong></font></font></a></TD>
</TR>
</TABLE>
</TD>
</TR>
<TR><TD WIDTH=174 align="center" valign="top">&nbsp;</TD></TR>
<TR>
<TD WIDTH=174>
<TABLE WIDTH="100%" BORDER=0 CELLSPACING=0 CELLPADDING=0 NOF=TE>
<TR>
<td>&nbsp;&nbsp;</td>
<td align="left" valign="middle" width="28"><a href="../NewSide/videolibrary.cfm"><img src="../Images/camera.gif" width="28" height="31" alt="Donate ProVision Network" border="0"></a></td>
<td>&nbsp;&nbsp;</td>
<TD ALIGN="left"><a href="../NewSide/videolibrary.cfm"><font class="BodyHead"><font color="#ffffff"><strong>Video Library</strong></font></font></a></TD>
</TR>
</TABLE>
</TD>
</TR>
<TR><TD WIDTH=174 align="center" valign="top">&nbsp;</TD></TR>
<TR>
<TD WIDTH=174>
<TABLE WIDTH="100%" BORDER=0 CELLSPACING=0 CELLPADDING=0 NOF=TE>
<TR>
<td>&nbsp;&nbsp;</td>
<td align="left" valign="middle" width="28"><a href="../NewSide/DonationNew.cfm"><img src="../Images/bell.gif" width="28" height="31" alt="Donate ProVision Network" border="0"></a></td>
<td>&nbsp;&nbsp;</td>
</TR>
</TABLE>
</TD>
</TR>
<TR><TD WIDTH=174 align="center" valign="top">&nbsp;</TD></TR>
<TR>
<TD WIDTH=174>
<TABLE WIDTH="100%" BORDER=0 CELLSPACING=0 CELLPADDING=0 NOF=TE>
<TR>
</TR>
</TABLE>
</TD>
</TR>
<TR><TD WIDTH=174 align="center" valign="top">&nbsp;</TD></TR>
<TR>
<TD WIDTH=174>
<TABLE WIDTH="100%" BORDER=0 CELLSPACING=0 CELLPADDING=0 NOF=TE>
<TR>
<td><a href="../NewSide/PVNChapters.cfm"><img src="../Images/webservice/pvnreseller.gif" alt="Chapter Meetings & National Info" border="0"></a></td>
</TR>
</TABLE>
</TD>
</TR>
<TR><TD WIDTH=174 align="center" valign="top">&nbsp;</TD></TR>
<TR>
<TD WIDTH=174>
<TABLE WIDTH="100%" BORDER=0 CELLSPACING=0 CELLPADDING=0 NOF=TE>
<TR>
<td><a href="../career/"><img src="../Images/webservice/careercenter.gif" alt="ProVision Network Career Center" border="0"></a></td>
</TR>
</TABLE>
</TD>
</TR>

<TR>
<TD WIDTH=174 align="center" valign="top">&nbsp;
</TD>
</TR>

<TR>
<TD align="center"><br>
<font color="Yellow">
<b><font size="+1">ProVision Network<br><br></font>
One Wall Street Court<br>
New York, NY 10005<br>
212-248-0146<br></font></font>
<a href="mailto:info@provisionnetwork.com"><font color="Yellow"><b>info@provisionnetwork.com</b></a><br>
</b></font>
<br><br>
<P><a href="map.cfm" target="_blank"><font class="BodyHead"><font color="#ffffff"><strong><u>Map of Local NYC Area <br><br>(Corp. Office & Service Locations)</u><br></a></strong></P></font></FONT><br><br>
</TD>
</TR>
<TR>
<TD WIDTH=174 HEIGHT=55>

<table border="0" cellspacing="1" cellpadding="4"><tr><td align="center" bgcolor="#EFEFEF" >
<img src="https://chart.bigcharts.com/custom/alliance/gifquote/alliance-fp-green-1.img" alt="CBS Marketwatch">

</td></tr></table>
</td></tr></table>

</TD>
</TR>
<TR>
<b>Market Outlook Q2 03</b></a></u></font></font>
</TD>
</TR>

</TABLE>

</TD>
</TR>
<TR ALIGN=LEFT>
<TD WIDTH="133" BGCOLOR="#3C5904" valign="top">&nbsp;</TD>
<TD width="497" valign="top" align="center">
<hr align="center" width="400">
</TD>
<TD WIDTH="174" BGCOLOR="#3C5904" align="center" valign="top">&nbsp;</TD>
</TR>
</TABLE>
<SCRIPT language="javascript">
</SCRIPT>

</BODY>
</HTML>

0

LVL 11

Expert Comment

ID: 9880228
just a small change in jesters code

<input type="text" name="donation" value="" onBlur="javascript:if(this.value != ''){document.formname.totalsale.value=parseFloat(document.formname.totalsale.value) + parseFloat(this.value);};">

i have used parseFloat because while adding u need to onvert the values into numerical format other wise they will just get concated..

Regards
Hart

0

LVL 25

Expert Comment

ID: 9881936
hart,

i tried parseFloat on the second value , ie \$15.85 and it kept giving me an error, so that's why i went with moving the \$ outside the number and used eval in the routine
0

LVL 11

Expert Comment

ID: 9886889
Jester,

i didn't suggest to write the \$ inside the text box...
that remains as u had suggeted..

only thing i asked was while using +, it is better to use parseFloat while adding two numbers...

Regards
Hart
0

LVL 25

Expert Comment

ID: 9896041
np....

just explaining why i did what i did
0

## Featured Post

Are you using email marketing software? If not, you're missing out on effortless marketing and the reaching of desired conversion rates through email marketing software.
SSL stands for “Secure Sockets Layer” and an SSL certificate is a critical component to keeping your website safe, secured, and compliant. Any ecommerce website must have an SSL certificate to ensure the safe handling of sensitive information like…
The purpose of this video is to demonstrate how to add AdSense Ads to a WordPress Website, and how to set up WordPress to automatically place Ads in Sidebars. This will be demonstrated using a Windows 8 PC. Log into your AdSense account. : Cli…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.