1. Three options to link javascript to a button
    1. buttons have associated events you can use

      <input type="button" name="submit" value="submit" onClick="return checkForm()">

    2. forms have associated events

      <Form id="form1" name="form1" onSubmit = "return checkForm()" METHOD=POST ACTION="somepage.asp">

      <input type="text" name="fullName" size=55>

      </form>

    3. **You can have the script inline - right there on the link in the html page

      <Form id="form1" name="form1" METHOD=POST ACTION="somepage.asp">

      <input type="text" name="fullName" size=55>
      <input type="button" name="submit" value="submit" onClick='if ( fullName = "" ){alert("Please enter your name");return false;}'>

      </form>
  1. Three options to link javascript to text or an image
    1. Using events on text or an image

      <a href="#" onMouseOver = "swaptwoLayers('clickPop','dollsLayer' )" > Click here</a>

    2. Javascript reference inside the href link

      <a href="javascript:openWindow()" >Click here</a>

    3. **Put the script inline -- right there

      <a href="#" onMouseOver = "document.images['homeButton'].src='dim.gif'" > Click here</a>

      **on these two bottom examples -- note the nested quotes - single quotes inside, double quotes outside it doesn't matter if you use single quotes outside, but then you must use double quotes inside