F A JavaScript Search Engine Using Frames

Making a JavaScript Search Engine in Frames

The only difference, in relation to the search engine, between this page and the previous one is the code below. The change is shown in red. To understand this, if necessary, go to the page on frames.

<script type="text/javascript">


function go(){

/* When our user presses the button (in the form) we check to see if anything has been selected. Also we don't want the first selection which is 'Results' or the sorry message. */

if (document.F187.MySelect.selectedIndex>0){



else {

alert('Please select an option.')





Of course, you need to move the form and the code to the side page, or wherever you want it, and you may also have to change the page targets, so the pages load where you want them. For instance, I used: You can learn about frames in the HTML Tutorial, going to the page about base targets in frames (Frames - Getting to the target!).