Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 6 of 6
  1. #1
    Senior Member skrlin's Avatar
    Join Date
    Apr 2003
    Location
    Illinois
    Posts
    562
    Member #
    1063
    I have a page I set up for my own "Home Page" for Firebird (originally IE) basically an "eye candy" version of my bookmarks. I migrated the page from IE to Firebird and cleaned the code up a bit, now when I select a link to go to I get a JavaScript error saying the function goThere is not defined. :-/

    Here's my code (sorry if it stretches) :
    Code:
    <html>
    <head>
    <title>Home Page - Where would you like to go?</title>
    <style type="text/css">
    .inv { visibility: hidden; }
    TD   { color: #FFFFFF; }
    BODY { overflow: hidden; }
    </style>
    
    <script type="text/javascript">
    function goThere(loc) {
     if (loc != "null") { location.href = loc; } else { return true; } 
    }
    function resetThem() {
    document.getElementById('ebay')selectedIndex = 0;
    document.getElementById('book')selectedIndex = 0;
    document.getElementById('ser').selectedIndex = 0;
    document.getElementById('ani').selectedIndex = 0;
    document.getElementById('car').selectedIndex = 0;
    document.getElementById('other').selectedIndex = 0;
    document.getElementById('dbz').selectedIndex = 0;
    document.getElementById('web').selectedIndex = 0;
    document.getElementById('mny').selectedIndex = 0;
    document.getElementById('bus').selectedIndex = 0;
    document.getElementById('job').selectedIndex = 0;
    document.getElementById('mov').selectedIndex = 0;
    document.getElementById('ast').selectedIndex = 0;
    document.getElementById('pep').selectedIndex = 0;
    document.getElementById('sch').selectedIndex = 0;
    document.getElementById('comp').selectedIndex = 0;
    document.getElementById('game').selectedIndex = 0;
    document.getElementById('sim').selectedIndex = 0;
    document.getElementById('snk').selectedIndex = 0;
    }
    </script>
    </head>
    <body bgcolor="#000000" text="#FF0000" onLoad="resetThem(); document.getElementById('q2')focus();">
    <script type="text/javascript">
    dh = document.body.clientHeight;
    document.writeln('<table border=0 cellpadding=0 cellspacing=0 style="z-index: -29">'+
    	 '<tr><td style="height: '+dh+'px; width: '+screen.width+'px" align="center" valign="middle">'+
    	 '<img src="./dragon2.jpg" height=775 width=600 oncontextmenu="return false" ondrag="return false">'+
    	 '</td></tr></table>');
    </script>
    
    <fieldset style="position:absolute; left: 475px; top: 75px;">
    <legend><font style="Bookman Old Style" color="#FF0000"><i>Goto Location</i></font></legend>
    <form action="http://www.skrlin.com/other/goto.php" method="POST"
     target="newPage" onSubmit="setTimeout('location.reload(true)',1000)">
     <input name="loca" id="loca" type="text" style="width: 245px" value="http://" />
     <input type="submit" name="sa" value=" Go ! ">
    </form>
    </fieldset>
    
    <div style="position: absolute; left: 200px; top: 105px;">
    <B>eAuction:</b> (<B>5</b>)<BR>
    <select id="ebay" onChange="goThere(this.value)" style="width: 215px">
     <option value="null" selected>Select an eAuction site...</option>
     <option value="http://www.ebay.com/">&nbsp;&nbsp;eBay.com</option>
     <option value="http://www.amazon.com/">&nbsp;&nbsp;Amazon</option>
     <option value="http://www.usps.com/">&nbsp;&nbsp;United States Postal</option>
     <option value="http://www.ups.com/">&nbsp;&nbsp;United Parcel Services</option>
    </select>
    </div>
    
    <div style="position: absolute; left: 900px; top: 465px;">
    <B>Games!!</b> (<B>4</b>)<BR>
    <select id="game" onChange="goThere(this.value)" style="width: 215px">
     <option value="null" selected>Select a gaming site...</option>
     <option value="http://www.gamestop.com/default.asp">&nbsp;GameStop</option>
     <option value="http://www.gamecrazy.com/">&nbsp;GameCrazy</option>
     <option value="http://www.ebgames.com/ebx/default.asp">&nbsp;EB Games</option>
     <option value="http://www.gamefaqs.com/">&nbsp;Game FAQs</option>
    </select>
    </div>
    
    <!-- a few more divs set up similarly -->
    
    <BR><BR><BR><script type="text/javascript" src="ser.js"></script>
    
    <fieldset style="position: absolute; top: 710px; left: 465px;">
     <legend><font style="Bookman Old Style" color="#FF0000">
      <i>Select a site to search</i>
     </font></legend>
    <form id="sForm" action="http://www.google.com/search"
     target="_new" method="get" onSubmit="change(this)">
     <table border=0 cellpadding=0 cellspacing=0>
      <tr>
       <td>
        <input name="q2" id="q2" type="text" style="width: 245px" value="" length="31"/>
       </td>
       <td id="params">
        <input type="submit" name="submit" value=" Search ! ">
        <input type="hidden" name="num" value="100" />
        <input type="hidden" name="hl" value="en" />
        <input type="hidden" name="q">
       </td>
      </tr>
      <tr>
       <td colspan=2>
        <input type="radio" id="s1" name="site" value="google" checked onClick="valid(this.value)">
     <label for="s1">Google</label>
        <input type="radio" id="s2" name="site" value="yahoo" onClick="valid(this.value)">
     <label for="s2">Yahoo! Yellow Pages</label><BR>
        <input type="radio" id="s3" name="site" value="ebay" onClick="valid(this.value)">
     <label for="s3">eBay</label>&nbsp;&nbsp;&nbsp;
        <input type="radio" id="s4" name="site" value="amazon" onClick="valid(this.value)">
     <label for="s4">Amazon</label><BR>
       </td>
      </tr>
     </table>
    </form>
    </fieldset>
    </body>
    </html>
    I also get "missing ; before statement" at line 17 and in the body-onload. Any insight ?
    - Brian

  2.  

  3. #2
    Senior Member mossoi's Avatar
    Join Date
    Apr 2003
    Location
    Englandshire, United Kingdomsville y'all!
    Posts
    1,111
    Member #
    1206
    Liked
    1 times
    Are you missing a couple of periods here:

    function resetThem() {
    document.getElementById('ebay')selectedIndex = 0;
    document.getElementById('book')selectedIndex = 0;
    I don't know any JavaScript but the missing; seems to be on or around the lines with the missing period

  4. #3
    Senior Member mossoi's Avatar
    Join Date
    Apr 2003
    Location
    Englandshire, United Kingdomsville y'all!
    Posts
    1,111
    Member #
    1206
    Liked
    1 times
    Well, replacing the missing periods has got the site going to the various links without error but the search engine form is still not right.

    Alas, I have exhausted my knowledge of JavaScript.

  5. #4
    Senior Member skrlin's Avatar
    Join Date
    Apr 2003
    Location
    Illinois
    Posts
    562
    Member #
    1063
    Yep, you got it right. Figures I'd miss something like that.

    The SE form works from the external ser.js
    You can see a working version of that here.

    Thanks again.
    - Brian

  6. #5
    Senior Member mossoi's Avatar
    Join Date
    Apr 2003
    Location
    Englandshire, United Kingdomsville y'all!
    Posts
    1,111
    Member #
    1206
    Liked
    1 times
    glad it's sorted.

    Just shows what a fresh pair of eyes can do even if they aren't at all qualified.

  7. #6
    Senior Member splufdaddy's Avatar
    Join Date
    Feb 2003
    Location
    Boston, MA
    Posts
    4,488
    Member #
    735
    I downloaded a beta version of Firebird, and I got an error on pages all over the web that I previously didn't get errors on. I reinstalled ver 0.6 and the error disappeared. I think the error message you got is the same one I got, but I could be wrong (it happens! )


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 11:00 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com