JSFiddle - React, Tailwind, and code Playground

by rjurd

HTML

<div id="container"><!-- Top of the page and page location -->
    <div id="howmuch"> 
        <form method="post" name="Calculator" id="Calculator">
            <table width="159" border="0" cellpadding="0" cellspacing="0">
                <tbody><tr>
                    <th height="46" colspan="2" align="center" valign="middle" class="formtxt" scope="col">How much can I borrow?</th>
                    </tr>
                    <tr>
                        <th colspan="2" align="center" class="formtxt" scope="col">I can afford to pay this amount each month: <br>
                            (eg 2000)</th>
                    </tr>
                    <tr>
                        <th colspan="2" scope="row"><div align="left">
                            <table border="0" align="center" cellpadding="4" cellspacing="0">
                                <tbody>
                                    <tr>
                                        <td width="12"><font color="#004c7e" face="Verdana, Arial, Helvetica, sans-serif" size="1">$</font></td>
                                        <td><font color="#004c7e" face="Verdana, Arial, Helvetica, sans-serif" size="1">
                                            <input name="pmt" maxlength="7" size="9" onchange="checkPayment(this)">
                                            </font></td>
                                    </tr>
                                </tbody>
                            </table>
                            </div></th>
                    </tr>
                    <tr align="center">
                        <th colspan="2" scope="row"><font color="#004c7e" size="1" face="Verdana, Arial, Helvetica, sans-serif"> Interest Rate: (eg 8.5)</font></th>
                    </tr>
                    <tr>
                        <th colspan="2" scope="row"><div align="left">
                            <table border="0" align="center" cellpadding="4" cellspacing="0">
                                <tbody>
...

JavaScript

function openNewWindow(URLtoOpen, windowName, windowFeatures) {
    newWindow = window.open(URLtoOpen, windowName, windowFeatures);
} /****************************************************     Author: Eric King      Url: http://redrival.com/eak/index.shtml      This script is free to use as long as this info is left in      Featured on Dynamic Drive script library (http://www.dynamicdrive.com) ****************************************************/
var win = null;

function NewWindow(mypage, myname, w, h, scroll, pos) {
    if (pos == "random") {
        LeftPosition = (screen.width) ? Math.floor(Math.random() * (screen.width - w)) : 100;
        TopPosition = (screen.height) ? Math.floor(Math.random() * ((screen.height - h) - 75)) : 100;
    }
    if (pos == "center") {
        LeftPosition = (screen.width) ? (screen.width - w) / 2 : 100;
        TopPosition = (screen.height) ? (screen.height - h) / 2 : 100;
    } else if ((pos != "center" && pos != "random") || pos == null) {
        LeftPosition = 0;
        TopPosition = 20
    }
    settings = 'width=' + w + ',height=' + h + ',top=' + TopPosition + ',left=' + LeftPosition + ',scrollbars=' + scroll + ',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
    win = window.open(mypage, myname, settings);
}
/**
 * DHTML email validation script. Courtesy of SmartWebby.com (http://www.smartwebby.com/dhtml/)
 */

function echeck(str) {

    var at = "@";
    var dot = ".";
    var lat = str.indexOf(at);
    var lstr = str.length;
    var ldot = str.indexOf(dot);
    if (str.indexOf(at) == -1) {
        alert("Invalid E-mail ID");
        return false
    }

    if (str.indexOf(at) == -1 || str.indexOf(at) == 0 || str.indexOf(at) == lstr) {
        alert("Invalid E-mail ID")
        return false
    }

    if (str.indexOf(dot) == -1 || str.indexOf(dot) == 0 || str.indexOf(dot) == lstr) {
        alert("Invalid E-mail ID")
        return false
    }

    if (str.indexOf(at, (lat + 1)) != -1) {
     ...