Advertisement
ASP_Volume2 Data Structures #42239

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.

AI

AI Summary: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Source Code
original-source
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
 }
Original Comments (3)
Recovered from Wayback Machine