TOPICS IN MIS SPRING 2007  BU4045

Home  |  Syllabus  |  Journal Project  | Exam Research  |  Gallery

*** On Tuesdays bring Volume 1 of Programming Easy Ways and on Thursday's bring Volume 2***

Thursday Feb 15th 2007

1) Review of Last Class

2)Question from Student-  How does a web page do a search interface?, How does it work?  +1 for Lulu

3) Textbook Volume 2

        Page 757 - 758

4)  Quiz - Makeup quiz content based on Journal content, general knowledge, research and class discussions.

5)   Research

            Sample from Dr. Ebrahimi's current publication Journal of Educational Technology Systems.

6)    Problems and Obstacles.

7)    Gallery

 

1) Review of Last Class

2)Question from Lulu-  How does a web page do a search interface?   The class project is www.programmingeasyways.com.

    Open Notepad or Frontpage.  

     Save the page you're going write the search engine on as         "Search.htm"

You can have a search engine either with or without a form.Type the following code to create a Search Engine as a form.

<html>

  <input type = "text">

</html>

The output for the above code is below.

                So we have an input area for our search but we don't have a button.  The code to add a button is below.

<html>
<input type = "text">
<input type = "button" value = "Search">

</html>

This adds a button but now we need to make the button do something.  We accomplish this by creating a script on our page and assigning it to the button.

<html>
<script language = "Javascript">
function buttonpressed()
{
document.writeln("Match not found.")
//This line comes from page 699 in the textbook
}
</script>



<input type = "text">
<input type = "button" value = "Search"
onclick = buttonpressed()>

So now we have a button but we need the button to do more than just tell us that it can't find anything.   We have to specify all of the possibilities that the end user could search on.

See the code below to see how to specify
</html>

<html>
<title> Search Programming Easy Ways</title>
<script language = "Javascript">
function buttonpressed()
{ if ( searchForm.inputVal.value == "cgi" )
document.location = "http://www.drebrahimi.com/2007Spring/BU4045/cgi.htm";
else if ( searchForm.inputVal.value == "gallery" )
document.location = "http://www.drebrahimi.com/2007Spring/BU4045/gallery.htm";
else if ( searchForm.inputVal.value == "ebrahimi" || searchForm.inputVal.value == "ebrahim" || searchForm.inputVal.value == "ibrahimi" )
document.location = "http://www.drebrahimi.com/";
else if ( searchForm.inputVal.value == " " )
searchForm.document.writeln ("Don't search for spaces!! - 5 points")
else searchForm.document.writeln ("Sorry no match")
//This line comes from page 699 in the textbook
}
</script>


<form name="searchForm"><p> Please enter your keyword </p>
<input name = "inputVal" type = "text">
<input type = "button" value = "Search"
onclick = buttonpressed()>
</FORM>


</html>

 

You can see the output of the code above by click HERE