Saturday, April 24, 2010

Assignment 11 - Connecting with the form, Check Browser Type

LABAR Assignment 11  Check Browser Type Form
This Assignment 11 - Check Browser Type form, to be done during your one hour lab by arrangement (LABAR). You are required to familiar with connecting the html form with the javascript function. The value of a system built-in variable, navigator.appName, is returned to the onClick event of the submit input in the form:
The finished project should look like the following:

Find the browser type

1 - Microsfot Internet Explorer
2 - Netscape (Firefox)
3 - Others



The onClick event of the form uses a system built-in variable navigator.appName. The usage of this variable are shown in the example below.


The example has the necessary code for you to complete the assignment11. From the example, you shall change the findBrowser(input) function, to test on the returned string value from navigator.appName system built-in variable.

In order to display a value, for example "1", onto the Form Input Field, simply assign the value to the input.value variable inside the findBrowser() function:
input.value = 1;
The following numbers are defined (for input.value variable):
1 - Microsfot Internet Explorer
2 - Netscape (Firefox)
3 - Other types of browsers

Here is the flowchart for the above logic:


 
Please submit your javascript work in .html file through webCT-assignment.
Note: The following code is for reference only. You submission will be disgarded and NO points will be awarded, if  any of the submitted code  resembles the following example:

Example

Find the browser type


No comments:

Post a Comment

 

comsc-100 Copyright © 2009 Gadget Blog is Designed by Ipietoon Sponsored by Online Business Journal