Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript ASP to JS?

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • #268801
    cives
    Participant

    Hi 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.asp

    source 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, WTP

    if 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 if

    function 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>
                &lt;input id=&quot;txtVisitors&quot; name=&quot;txtVisitors&quot; type=&quot;text&quot; Value=&quot;" required/&gt;
            </td>
        </tr>
        <tr>
            <td>Average Monthly Website leads</td>
            <td>
                &lt;input id=&quot;txtLeads&quot; name=&quot;txtLeads&quot; type=&quot;text&quot; Value=&quot;" required/&gt;
            </td>
        </tr>
        <tr>
            <td>Percentage of Qualified Leads %</td>
            <td>
                &lt;input id=&quot;txtQual&quot; name=&quot;txtQual&quot; type=&quot;text&quot; value=&quot;" required/&gt;
            </td>
        </tr>
        <tr>
            <td>Close Rate %</td>
            <td>
                &lt;input id=&quot;txtClose&quot; name=&quot;txtClose&quot; type=&quot;text&quot; value=&quot;" required/&gt;
            </td>
        </tr>
        <tr>
            <td>Customer Lifetime Value</td>
            <td>
                &lt;input id=&quot;txtCLV&quot; name=&quot;txtCLV&quot; type=&quot;text&quot; value=&quot;" required/&gt;
            </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!

Viewing 1 post (of 1 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.