developer sign in
Jin Examples » Digging to China

Digging to China

Output
<jin cache="false">

    <script>
        function mapMe() {
              var formObj = document.mapForm;
              formObj.clat.value = '39.45';
              formObj.clng.value = '-77.45';

              formObj.name.value = 'MY FEET';
              formObj.width.value = screenWidth();
              formObj.height.value = screenHeight();
              formObj.submit();
        }

        function mapAntipode() {

              var formObj = document.mapForm;
              formObj.clat.value = '-39.45';
              formObj.clng.value = '102.55';
              formObj.name.value = 'MY HEAD';
              formObj.width.value = screenWidth();
              formObj.height.value = screenHeight();

              formObj.submit();
        }

        function newLoc() {
              var formObj = document.locForm;
              var clat = 'N';
              if(document.choicelat.isSelected(1)) {

            clat = 'S';
              }
              var clng = 'W';
              if(document.choicelng.isSelected(1)) {
            clng = 'E';
              }

              var newCLat = clat + ' ' + document.newlat.value + '.' + document.newlatdec.value;
              var newCLng = clng + ' ' + document.newlng.value + '.' + document.newlngdec.value;
              formObj.newlat.value = newCLat;
              formObj.newlng.value = newCLng;
              formObj.submit();
        }
    </script>

    <form id="mapForm" action="/map.jin" method="GET">
        <input type="hidden" id="zoom" value="13"/>
        <input type="hidden" id="clng" value=""/>
        <input type="hidden" id="width" value=""/>
        <input type="hidden" id="clat" value=""/>

        <input type="hidden" id="height" value=""/>
        <input type="hidden" id="name" value=""/>
    </form>

    <form id="locForm" action="/china.jin" method="GET">
        <input type="hidden" id="newlng" value=""/>
        <input type="hidden" id="newlat" value=""/>
    </form>


    <body fontSize="small" bg="0xFF9933" fg="0xFFFFFF">

        <pr><img src="http://www.where.com/images/dd/mobile/widgets/titlechina240.png" colspan="3"/></pr>
        <pr><ln size="1" fg="0x83E2F9" colspan="3"/></pr>
        <pr><text height="5" colspan="3"> </text></pr>
        <pr><text colspan="3">If you start digging a very deep straight hole on Earth at the place where you are standing now, where would you end up? China?&br;Let's see...</text></pr>

        <pr><text height="5" colspan="3"> </text></pr>
        <pr><text colspan="3">Your current location is&br;W 77.45, N 39.45</text></pr>
        <pr><text height="5" colspan="3"> </text></pr>

        <pr><text colspan="3">A line going through the center of Earth from one point comes out at another point in the opposite quadrant - its antipode. This is, by the way, why English call Australian continent Antipodes. Let's see where that point for your current location is...</text></pr>
        <pr><text height="5" colspan="3"> </text></pr>
        <pr><text colspan="3">Your antipode is at&br;E 102.55, S 39.45</text></pr>

        <pr><text height="5" colspan="3"> </text></pr>
        <pr><input type="button" value="Map My Feet" fg="0x000000" fgfocus="0xCF5719" bg="0xCCFFCC" onSelect="mapMe();"/><input type="button" value="Dig Now!" fg="0x000000" fgfocus="0xCF5719" bg="0xCCFFCC" onSelect="mapAntipode();" colspan="2"/></pr>
        <pr><text height="10" colspan="3"> </text></pr>

        <pr><text colspan="3">Want to try some other location?</text></pr>
        <pr><text height="5" colspan="3"> </text></pr>
        <pr><text height="5" colspan="3">Enter Latitude</text></pr>

        <pr>
            <choice id="choicelat" type="radio" bgfocus="0xCF5719" borderfocus="0xCCFFCC" colspan="3">
                <input type="choice" value="N" checked="true">N</input> <input type="choice" value="S">S</input>
            </choice>
        </pr>
        <pr>
            <input type="text" id="newlat" size="3" constraint="numeric" width="40"/>
            <text width="10" fg="0x000000">.</text><input type="text" id="newlatdec" size="5" constraint="numeric" value="00"/>
        </pr>

        <pr><text height="2" colspan="3"> </text></pr>

        <pr><text height="5" colspan="3">Enter Longitude</text></pr>

        <pr>
            <choice id="choicelng" type="radio" bgfocus="0xCF5719" borderfocus="0xCCFFCC" colspan="3">
                <input type="choice" value="W" checked="true">W</input> <input type="choice" value="E">E</input>
            </choice>
        </pr>

        <pr>
            <input type="text" id="newlng" size="3" constraint="numeric" width="40"/>
            <text width="10" fg="0x000000">.</text>
            <input type="text" id="newlngdec" size="5" constraint="numeric" value="00"/>
        </pr>

        <pr><text height="10" colspan="3"> </text></pr>

        <pr><input type="button" value="Submit" fg="0x000000" fgfocus="0xCF5719" bg="0xCCFFCC" onSelect="newLoc();" colspan="3"/></pr>

        <pr><text height="2" colspan="3"> </text></pr>

        <footer>
            <img id="rightCmd" src="http://www.where.com/images/dd/mobile/240/blank.png"/>
            <img id="leftCmd" src="http://www.where.com/images/dd/mobile/240/back.png" onSelect="home()"/>      
        </footer>
    </body>
</jin>
trademarks | terms of use | privacy policy | about | FAQ | blog | jobs | contact us
For 24/7 support email support@where.com or call 888-262-1150
WHERE™ is a product from uLocate Communications, Inc. ©2008 All Rights Reserved.