Home › Forums › JavaScript › ASP to JS?
- This topic is empty.
-
AuthorPosts
-
March 23, 2018 at 1:39 pm #268801
cives
ParticipantHi guys, I recently outsourced an ROI calculator to be developed. However, it was done in ASP, when I really needed it to be done in JS. Unfortunately the CMS we are using, HubSpot, doesn’t support ASP.
Any insight as to if this would be an easy conversion:
http://www.chandlerives.com/roi.aspsource code:
<title>ROI Test Page</title>
<%
'SCRIPTS AND CALCULATIONS
on error resume next
Dim MoVisitors, MoLeads, PctQualLeads, CloseRate, CLV, ConRate, QualLeads, NewCust, Gross, BL1, BL2, BL3, WTPif Request.ServerVariables("REQUEST_METHOD") = "POST" Then
WTP=request.form("lstWT")
MoVisitors=request.form("txtVisitors")
MoLeads=request.form("txtLeads")
PctQualLeads=request.form("txtQual")
CloseRate=request.form("txtClose")
CLV=request.form("txtCLV")
'Do the math now
ConRate=FormatNumber((clng(MoLeads)/clng(MoVisitors))100,2,true,false,true)
QualLeads=FormatNumber(clng(MoLeads)(cint(PctQualLeads)/100),2,true,false,true)
NewCust=FormatNumber(clng(QualLeads)(cint(CloseRate)/100),2,true,false,true)
Gross=FormatNumber(cCur(NewCust)cLng(CLV),2,true,false,true)
BL1=FormatNumber((cCur(Gross)*cLng(CLV)) * (cint(WTP)/100/cLng(CLV)),2,true,false,true)
BL2=FormatNumber(cCur(Gross)+cCur(BL1),2,true,false,true)
end iffunction lstWT()
lstWT = "”
lstWT = lstWT & “10%”
lstWT = lstWT & “20%”
lstWT = lstWT & “30%”
lstWT = lstWT & “40%”
lstWT = lstWT & “50%”
lstWT = lstWT & “”
lstWT=Replace(lstWT,””,””,1)
end function%>
<form method="post" action="roi.asp"> <table> <th colspan="2">ROI Calculator</th> <tr> <td>Average Monthly Website Visitors</td> <td> <input id="txtVisitors" name="txtVisitors" type="text" Value="" required/> </td> </tr> <tr> <td>Average Monthly Website leads</td> <td> <input id="txtLeads" name="txtLeads" type="text" Value="" required/> </td> </tr> <tr> <td>Percentage of Qualified Leads %</td> <td> <input id="txtQual" name="txtQual" type="text" value="" required/> </td> </tr> <tr> <td>Close Rate %</td> <td> <input id="txtClose" name="txtClose" type="text" value="" required/> </td> </tr> <tr> <td>Customer Lifetime Value</td> <td> <input id="txtCLV" name="txtCLV" type="text" value="" required/> </td> </tr> <tr> <td></td> <td align="center"> </td> </tr> <tr><td colspan="2"><hr /></td></tr> <tr> <td>Conversion Rate</td> <td align="right"> % </td> </tr> <tr> <td>Average Qualified Leads/Month</td> <td align="right"> </td> </tr> <tr> <td>Average New Customers/Month</td> <td align="right"> </td> </tr> <tr> <td>Gross Profit/Month</td> <td align="right"> $ </td> </tr> <th colspan="2">Impact on Bottom Line</th> <tr> <td>With Increase in Web Traffic</td> <td align="right"> $ </td> </tr> <tr> <td>Total Impact on Bottom Line</td> <td align="right"> $ </td> </tr> </table> </form>
Thanks!
-
AuthorPosts
- The forum ‘JavaScript’ is closed to new topics and replies.