SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    Non-Member
    Join Date
    Jan 2004
    Location
    Seattle
    Posts
    4,328
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need help with conversion engine

    I found a really neat conversion engine at
    http://www.infoplease.com/pages/unit...ear&grp=common

    It says it's copyrighted by the Free Software Foundation, so I visited their website and wound up on this page:

    http://www.gnu.org/directory/science/units.html

    I downloaded it, but it looks like something completely different. I don't have a clue about how to make it work.

    So I went back to InfoPlease, which uses JavaScript, and found what appears to be the key file at http://img.infoplease.com/js/conversion_tool.js

    When I downloaded the page, it appears that all the files linked to it were downloaded, too. When I preview the page, it's defined by style sheets and the images are all in place - but the conversion engine doesn't work.

    I copied the page into one of website folders and stripped it down, then linked to the JS file again. But it still doesn't work. I suspect the problem might not be with the JavaScript but with the following code:

    <form name="fromto" action="/pages/unitconversion.html" method="get" onsubmit="return validateForm('fromto');">
    </form>

    I put the page I'm working on right next to the site's index page, and I put the JavaScript files in a folder named js. To reflect the page's new location on my site, I changed the form to the following:

    <form name="fromto" action="unitconversion.html"
    <form name="fromto" action="/unitconversion.html"

    But it still doesn't work. Any suggestions?

    Below is more of the code. Thanks!

    * * * * * * * * * *

    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
    <html><head><!-- -->
    <script src="unitconversion_files/master_js.js" language="JavaScript" type="text/javascript"></script>
    <link rel="stylesheet" href="unitconversion_files/ipbase.css" type="text/css"><!-- browser detect script -->
    <link rel="stylesheet" href="unitconversion_files/conversion_units.css" type="text/css">
    <meta name="waif" content="measurement">
    <meta name="waif" content="conversion">
    <meta name="waif" content="conversion calculator">
    <meta name="waif" content="unit conversion">
    <meta name="waif" content="calculator">
    <meta name="keywords" content="measurement conversion calculator unit conversion">
    <meta name="description" content="Interactive calculator used to convert between various units of measurement. Area, volume, length/distance, cooking, time, and more.">
    <title>Conversion Calculator</title><!-- 5: Channel
    Pick from the cheatsheet --><script language="JavaScript1.2" type="text/javascript"><!--
    var IPHWdest = "";
    var IPHWid = "ip";
    //--></script><!-- first popup -->
    <script language="JavaScript" type="text/javascript" defer="defer" src="unitconversion_files/oasisi-j.js"></script><!-- 923230938 --></head>

    <body>
    <table class="conmaintable" cellspacing="1" border="0" cellpadding="0" width="98%">
    <tbody>
    <tr>
    <td align="left" colspan="2" height="3" class="contabletoprow"><img src="unitconversion_files/03UC_crumb.gif" width="7" height="3" alt="" border="0"></td>
    </tr>
    <tr>
    <!-- if no unit type is selected (intro pg), give the list of options: -->
    <td align="left" valign="top" class="contoolarea">
    <!-- otherwise, if a unit type has been selected, offer the conversion form: -->
    <script src="unitconversion_files/conversion_tool.js" type="text/javascript" language="javascript"></script>
    <!-- Qty: | From: | To: | Ans: -->
    <!-- Begin conversion form code -->
    <table class="contooltext" width="100%" border="0" cellpadding="6" cellspacing="0" summary="Enter Quantity">
    <form name="fromto" action="/pages/unitconversion.html" method="get" onsubmit="return validateForm('fromto');">
    </form>
    <tbody>

  2. #2
    Non-Member
    Join Date
    Jan 2004
    Location
    Seattle
    Posts
    4,328
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Note: I moved this thread to the General Development section. I suspect this was the wrong forum, as I never really narrowed it down to just a JavaScript problem.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •