Javascipt and ASP
Javascript with ASP, this function is a example, how you can mix javascript and asp. The clue is it is clientside! In example a clientside calculator and need not to post anthing to the display.
Original Author: Hohl David
Code
function recalculate() {
//Berechne mir die Ausgabe bei der Order
totalsum = new Number();
<%
artSTMT = "SELECT * FROM article"
Set artRS = nameConn.Execute(artStmt)
while not artRS.eof
artID = trim(artRS("artID"))
%>
price<%=artID%> = new Number(document.orderform.price<%=artID%>.value);
quantity<%=artID%> = new Number(document.orderform.quantity<%=artID%>.value);
linesum<%=artID%> = new Number(quantity<%=artID%> * price<%=artID%>);
document.orderform.sumquantity<%=artID%>.value = linesum<%=artID%>;
//document.orderform.quantity<%=artID%>.value = quantity<%=artID%>;
totalsum = totalsum + linesum<%=artID%>;
<%
artRS.movenext()
wend
%>
document.orderform.sumtotal.value = totalsum
}
Loading Comments ...
Comments
No comments have been added for this post.
You must be logged in to make a comment.