How to Create a Word Search Program

Using Active X controls and Javascript

Before you begin, please consider that using Javascript with this will cause problems for browsers that do not support active x controls. You may want to use the VBscript version.

Creating the Physical Controls - What they look like.

A A AA AA AA AA AA AA AA AA AA
BB BB BB BB BB BB BB BB BB BB
CC CC CC CC CC CC CC CC CC CC
DD DD DD DD DD DD DD DD DD DD
EE EE EE EE EE EE EE EE EE EE
FF FF FF FF FF FF FF FF FF FF
GG GG GG GG GG GG GG GG GG GG
HH HH HH HH HH HH HH HH HH HH
II II II II II II II II II II
JJ JJ JJ JJ JJ JJ JJ JJ JJ JJ

THIS IS THE TABLE GRID USED TO BEGIN PUTTING ACTIVE X CONTROLS IN

At this point in time you need to have your layout of what letters are to go in the boxes. An easy way to do this is to lay out the puzzle on graph paper. That way you can visualize where you are at in creating the objects and scripting the buttons.

Scripting the Controls - Making Them Work

  1. Choose "Tools", "Options", "Script" then select "Javascript.
  2. Position the cursor before the first controlbutton.
  3. Click on "Tools" and select "Script- Wizard" This opens up a graphical interface with three windows: Events, Actions, and Events Schuduled.
  4. Click on the first commandbutton in the Events window. This will open up a list of events.
  5. Choose "click".
  6. In the Action window, select the same first commandbutton (this is why it was so important to give each button it's own name, if by some chance you forgot to do this, you can go back and re-edit all the objects).
  7. Refer to your graph grid. If this is a button that is part of a word, choose to change the backcolor only. If this is not a letter of a word, change both the caption and backcolor.
  8. Repeat the above for all the buttons. Remember to be careful in matching up button to button!
  9. When you are finished with all the buttons, click on "ok". The Script Wizard will now write all the code for you.
  10. Save your file.
  11. Preview your file in the browser. You can use "View", "Source" to edit the table properties and creat the visual effect you want.(Such as no cell padding , no border, etc.)
  12. Test the command buttons to make sure they all work the way you want them to. If not, you can re-open the file in the Control Pad and make the necessary corrections, or you can find your errors in the "param" in the html by using view - source and edit them directly in the browser.

Return to Main Page

Sign Guestbook View Guestbook

Best experienced with
Click Here to Start
Click here to start.
Journey on to Links

©Mary L. Walker (Hayes) 1996

1