SlideShare a Scribd company logo
1 of 12
Download to read offline
User Services
                                                                                               Summer 2000


                             Introduction to
• Create readable output
  from a web form to
  your mail reader.              JavaScript Part II
• Check your form
                             Introduction
  contents with JavaScript
                              JavaScript provides the capability of interactive, dynamic Web pages and
• Learn image swapping        can be integrated right into your HTML. In “Part II”, how to send the
  with JavaScript code.       output from your form to your email address in a readable format will be
                              shown. This includes the use of a CGI script. Using JavaScript, partici-
• Create objects,             pants will write scripts to check the contents of a form, create image
  properties and methods      swapping and use “this” and “new” to create objects and properties.
  in JavaScript.

Tip:
JavaScript can be used       Need Help?
                             The Help Desk is a service provided to all students, staff, and faculty at Mississippi State
to check the contents of
                             University at no charge. The consultants are here to help you with various computer-
a form, before the form      related information or problems. Check the Web site at http://www.its.msstate.edu for
is submitted.                handouts and/or resolutions to common computer problems. If you cannot find an answer
                             to your question on the Web or you do not have access to the Internet, please call us at
                             325-0631(7:00a.m. to 7:00 p.m.Monday through Friday).You can also e-mail us at
                             helpdesk@msstate.edu or come by our office at 46 Magruder Street (the blue house
                                                                     behind Rice Hall) with walk-in hours from
                                                                     8:00 a.m. to 5:00 p.m. weekdays.



                                                                            Facilitators
                                                                                     Harriet Foley
                                                                                   hvf1@its.msstate.edu

                                                                                     Jim Stanmore
                                                                                 stanmore@its.msstate.edu
User Services




    Index

    Using a CGI Script with HTML

    1. Sending Output From Your Form to Your Email Address in a Readable Format...........3-5
    2. Mail-form Script........................................................................................................6-8

    Using JavaScript with HTML

    3.   On-line JavaScript References .....................................................................................8
    4.   Using JavaScript to Check Your Form Content............................................................9
    5.   Image Swapping.........................................................................................................10
    6.   Creationism- Using “this” and “new”...........................................................................11




2
User Services


 Example Form on Browser


 We will be using this form to demonstrate how to create readable output in your mail
 reader. When the form is submitted, the output will be sent to your mail reader in a
 neat column.




On the following page is the HTML for this web page. It includes fields for creating
email with readable output which are explained on the page following the output.




                                                                                        3
User Services

    HTML for previous Web Page
    Save this in a file named news.html.




4
User Services

     Explanation of Hidden Fields



1.

2.


3.


4.

5.



6.




     Output if Sent to your Ra address on Pine.




                                                              5
User Services

     CGI (Common Gateway Interface) Perl Script to process data

     mail-form.pl




1.




2.



3.




4.




5.



 6
User Services




6.



Top of
Output




Middle of
Output




Bottom of
Output




                        7
User Services




             You can see the flow of the above cgi program.




OnLine JavaScript References

    1. http://developer.netscape.com/docs/manuals/communicator/jsref/contents.htm

    2. http://home.netscape.com/eng/mozilla/3.0/handbook/javascript/

    4. http://wdvl.internet.com/Authoring/JavaScript/Tutorial/conclude.html

    5. http://www.webmonkey.com




8
User Services
Using JavaScript to Check Your Form Contents
1. Add the following event handler and javascript code to the FORM tag in the
   news.html file, “Subscribe to Department Newsletter”, so that the Form Tag looks like the
   following.




2. Put the following function between the header tags.




3. Test your form by leaving out name and then submitting it.




                                                                                               9
User Services

     Image Swapping

     Download the 2 gif files “button1a.gif” and “button1b.gif” from the J drive to your
     local folder. Type the following program into the same folder in file image.htm.
     Then test it out in Netscape Navigator.




10
User Services
    Creationism. Using “this” and “new”.
    Creating your own objects and properties.
    You can create your own objects, properties and methods. This example is taken from
    “JavaScript for Dummies”.




         By using the new operator with a function you can define a new type of object. And
         you can add your own methods.

Output




                                                                                              11
A publication of
     User Services, a division of Information Technology Services,
                      Mississippi State University

                               Mike Rackley, Head




Mississippi State University does not discriminate on the basis of race, color, religion,
                 national origin, sex, age, disability, or veteran status.

More Related Content

Similar to javascript2

Appalanaidu_4.4 Years Exp in DotNet Technology
Appalanaidu_4.4 Years Exp in DotNet TechnologyAppalanaidu_4.4 Years Exp in DotNet Technology
Appalanaidu_4.4 Years Exp in DotNet Technology
APPALANAIDU KONDALA
 
Rutgers - FrontPage 98 (Advanced)
Rutgers - FrontPage 98 (Advanced)Rutgers - FrontPage 98 (Advanced)
Rutgers - FrontPage 98 (Advanced)
Michael Dobe, Ph.D.
 
etech11_12_q2mod7_basic_webpage_creation_v3.pdf
etech11_12_q2mod7_basic_webpage_creation_v3.pdfetech11_12_q2mod7_basic_webpage_creation_v3.pdf
etech11_12_q2mod7_basic_webpage_creation_v3.pdf
RhudelAndallo
 
Foundation and PathwaysCOS10020 Creating Web Application.docx
Foundation and PathwaysCOS10020 Creating Web Application.docxFoundation and PathwaysCOS10020 Creating Web Application.docx
Foundation and PathwaysCOS10020 Creating Web Application.docx
hanneloremccaffery
 
Online old books sales by hemraj gahlot
Online old books sales by hemraj gahlotOnline old books sales by hemraj gahlot
Online old books sales by hemraj gahlot
Hemraj Gahlot
 
Prepared by Dr Jahan Hassan Moderated by Dr Nandini Sidna.docx
Prepared by Dr Jahan Hassan  Moderated by Dr Nandini Sidna.docxPrepared by Dr Jahan Hassan  Moderated by Dr Nandini Sidna.docx
Prepared by Dr Jahan Hassan Moderated by Dr Nandini Sidna.docx
harrisonhoward80223
 

Similar to javascript2 (20)

Appalanaidu_4.4 Years Exp in DotNet Technology
Appalanaidu_4.4 Years Exp in DotNet TechnologyAppalanaidu_4.4 Years Exp in DotNet Technology
Appalanaidu_4.4 Years Exp in DotNet Technology
 
Rutgers - FrontPage 98 (Advanced)
Rutgers - FrontPage 98 (Advanced)Rutgers - FrontPage 98 (Advanced)
Rutgers - FrontPage 98 (Advanced)
 
etech11_12_q2mod7_basic_webpage_creation_v3.pdf
etech11_12_q2mod7_basic_webpage_creation_v3.pdfetech11_12_q2mod7_basic_webpage_creation_v3.pdf
etech11_12_q2mod7_basic_webpage_creation_v3.pdf
 
01 web 2.0 - more than a pretty face for soa
01   web 2.0 - more than a pretty face for soa01   web 2.0 - more than a pretty face for soa
01 web 2.0 - more than a pretty face for soa
 
crystal report
crystal reportcrystal report
crystal report
 
Extending Your Experience to the Office
Extending Your Experience to the OfficeExtending Your Experience to the Office
Extending Your Experience to the Office
 
FlexNet Delivery and FlexNet Operations On-Demand Tips & Tricks
FlexNet Delivery and FlexNet Operations On-Demand Tips & TricksFlexNet Delivery and FlexNet Operations On-Demand Tips & Tricks
FlexNet Delivery and FlexNet Operations On-Demand Tips & Tricks
 
IRJET- Implementation of E-Marketing using SPIP, Mysql Database, Html, and Bo...
IRJET- Implementation of E-Marketing using SPIP, Mysql Database, Html, and Bo...IRJET- Implementation of E-Marketing using SPIP, Mysql Database, Html, and Bo...
IRJET- Implementation of E-Marketing using SPIP, Mysql Database, Html, and Bo...
 
shailendra_resume
shailendra_resumeshailendra_resume
shailendra_resume
 
What is new in IBM Connections 5.5 and IBM Docs 2.0
What is new in IBM Connections 5.5 and IBM Docs 2.0What is new in IBM Connections 5.5 and IBM Docs 2.0
What is new in IBM Connections 5.5 and IBM Docs 2.0
 
This deck describes the new features in IBM Mashup Center v2
This deck describes the new features in IBM Mashup Center v2This deck describes the new features in IBM Mashup Center v2
This deck describes the new features in IBM Mashup Center v2
 
Wireless mobile content genteration application with RSS feed integration
Wireless mobile content genteration application with RSS feed integrationWireless mobile content genteration application with RSS feed integration
Wireless mobile content genteration application with RSS feed integration
 
Internet basic of it20
Internet basic of it20Internet basic of it20
Internet basic of it20
 
Foundation and PathwaysCOS10020 Creating Web Application.docx
Foundation and PathwaysCOS10020 Creating Web Application.docxFoundation and PathwaysCOS10020 Creating Web Application.docx
Foundation and PathwaysCOS10020 Creating Web Application.docx
 
Online old books sales by hemraj gahlot
Online old books sales by hemraj gahlotOnline old books sales by hemraj gahlot
Online old books sales by hemraj gahlot
 
Job center
Job centerJob center
Job center
 
HIA 1015 Speed the Development of Robust Integrations with IBM Integration Bu...
HIA 1015 Speed the Development of Robust Integrations with IBM Integration Bu...HIA 1015 Speed the Development of Robust Integrations with IBM Integration Bu...
HIA 1015 Speed the Development of Robust Integrations with IBM Integration Bu...
 
Prepared by Dr Jahan Hassan Moderated by Dr Nandini Sidna.docx
Prepared by Dr Jahan Hassan  Moderated by Dr Nandini Sidna.docxPrepared by Dr Jahan Hassan  Moderated by Dr Nandini Sidna.docx
Prepared by Dr Jahan Hassan Moderated by Dr Nandini Sidna.docx
 
Break Loose Acting To Forestall Emulation Blast
Break Loose Acting To Forestall Emulation BlastBreak Loose Acting To Forestall Emulation Blast
Break Loose Acting To Forestall Emulation Blast
 
sudheer_resume
sudheer_resumesudheer_resume
sudheer_resume
 

More from tutorialsruby

<img src="../i/r_14.png" />
<img src="../i/r_14.png" /><img src="../i/r_14.png" />
<img src="../i/r_14.png" />
tutorialsruby
 
TopStyle Help & <b>Tutorial</b>
TopStyle Help & <b>Tutorial</b>TopStyle Help & <b>Tutorial</b>
TopStyle Help & <b>Tutorial</b>
tutorialsruby
 
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting <b>...</b>
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting <b>...</b>The Art Institute of Atlanta IMD 210 Fundamentals of Scripting <b>...</b>
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting <b>...</b>
tutorialsruby
 
<img src="../i/r_14.png" />
<img src="../i/r_14.png" /><img src="../i/r_14.png" />
<img src="../i/r_14.png" />
tutorialsruby
 
<img src="../i/r_14.png" />
<img src="../i/r_14.png" /><img src="../i/r_14.png" />
<img src="../i/r_14.png" />
tutorialsruby
 
Standardization and Knowledge Transfer – INS0
Standardization and Knowledge Transfer – INS0Standardization and Knowledge Transfer – INS0
Standardization and Knowledge Transfer – INS0
tutorialsruby
 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa0602690047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
tutorialsruby
 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa0602690047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
tutorialsruby
 
BloggingWithStyle_2008
BloggingWithStyle_2008BloggingWithStyle_2008
BloggingWithStyle_2008
tutorialsruby
 
BloggingWithStyle_2008
BloggingWithStyle_2008BloggingWithStyle_2008
BloggingWithStyle_2008
tutorialsruby
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheets
tutorialsruby
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheets
tutorialsruby
 

More from tutorialsruby (20)

<img src="../i/r_14.png" />
<img src="../i/r_14.png" /><img src="../i/r_14.png" />
<img src="../i/r_14.png" />
 
TopStyle Help & <b>Tutorial</b>
TopStyle Help & <b>Tutorial</b>TopStyle Help & <b>Tutorial</b>
TopStyle Help & <b>Tutorial</b>
 
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting <b>...</b>
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting <b>...</b>The Art Institute of Atlanta IMD 210 Fundamentals of Scripting <b>...</b>
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting <b>...</b>
 
<img src="../i/r_14.png" />
<img src="../i/r_14.png" /><img src="../i/r_14.png" />
<img src="../i/r_14.png" />
 
<img src="../i/r_14.png" />
<img src="../i/r_14.png" /><img src="../i/r_14.png" />
<img src="../i/r_14.png" />
 
Standardization and Knowledge Transfer – INS0
Standardization and Knowledge Transfer – INS0Standardization and Knowledge Transfer – INS0
Standardization and Knowledge Transfer – INS0
 
xhtml_basics
xhtml_basicsxhtml_basics
xhtml_basics
 
xhtml_basics
xhtml_basicsxhtml_basics
xhtml_basics
 
xhtml-documentation
xhtml-documentationxhtml-documentation
xhtml-documentation
 
xhtml-documentation
xhtml-documentationxhtml-documentation
xhtml-documentation
 
CSS
CSSCSS
CSS
 
CSS
CSSCSS
CSS
 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa0602690047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa0602690047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
 
HowTo_CSS
HowTo_CSSHowTo_CSS
HowTo_CSS
 
HowTo_CSS
HowTo_CSSHowTo_CSS
HowTo_CSS
 
BloggingWithStyle_2008
BloggingWithStyle_2008BloggingWithStyle_2008
BloggingWithStyle_2008
 
BloggingWithStyle_2008
BloggingWithStyle_2008BloggingWithStyle_2008
BloggingWithStyle_2008
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheets
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheets
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 

javascript2

  • 1. User Services Summer 2000 Introduction to • Create readable output from a web form to your mail reader. JavaScript Part II • Check your form Introduction contents with JavaScript JavaScript provides the capability of interactive, dynamic Web pages and • Learn image swapping can be integrated right into your HTML. In “Part II”, how to send the with JavaScript code. output from your form to your email address in a readable format will be shown. This includes the use of a CGI script. Using JavaScript, partici- • Create objects, pants will write scripts to check the contents of a form, create image properties and methods swapping and use “this” and “new” to create objects and properties. in JavaScript. Tip: JavaScript can be used Need Help? The Help Desk is a service provided to all students, staff, and faculty at Mississippi State to check the contents of University at no charge. The consultants are here to help you with various computer- a form, before the form related information or problems. Check the Web site at http://www.its.msstate.edu for is submitted. handouts and/or resolutions to common computer problems. If you cannot find an answer to your question on the Web or you do not have access to the Internet, please call us at 325-0631(7:00a.m. to 7:00 p.m.Monday through Friday).You can also e-mail us at helpdesk@msstate.edu or come by our office at 46 Magruder Street (the blue house behind Rice Hall) with walk-in hours from 8:00 a.m. to 5:00 p.m. weekdays. Facilitators Harriet Foley hvf1@its.msstate.edu Jim Stanmore stanmore@its.msstate.edu
  • 2. User Services Index Using a CGI Script with HTML 1. Sending Output From Your Form to Your Email Address in a Readable Format...........3-5 2. Mail-form Script........................................................................................................6-8 Using JavaScript with HTML 3. On-line JavaScript References .....................................................................................8 4. Using JavaScript to Check Your Form Content............................................................9 5. Image Swapping.........................................................................................................10 6. Creationism- Using “this” and “new”...........................................................................11 2
  • 3. User Services Example Form on Browser We will be using this form to demonstrate how to create readable output in your mail reader. When the form is submitted, the output will be sent to your mail reader in a neat column. On the following page is the HTML for this web page. It includes fields for creating email with readable output which are explained on the page following the output. 3
  • 4. User Services HTML for previous Web Page Save this in a file named news.html. 4
  • 5. User Services Explanation of Hidden Fields 1. 2. 3. 4. 5. 6. Output if Sent to your Ra address on Pine. 5
  • 6. User Services CGI (Common Gateway Interface) Perl Script to process data mail-form.pl 1. 2. 3. 4. 5. 6
  • 7. User Services 6. Top of Output Middle of Output Bottom of Output 7
  • 8. User Services You can see the flow of the above cgi program. OnLine JavaScript References 1. http://developer.netscape.com/docs/manuals/communicator/jsref/contents.htm 2. http://home.netscape.com/eng/mozilla/3.0/handbook/javascript/ 4. http://wdvl.internet.com/Authoring/JavaScript/Tutorial/conclude.html 5. http://www.webmonkey.com 8
  • 9. User Services Using JavaScript to Check Your Form Contents 1. Add the following event handler and javascript code to the FORM tag in the news.html file, “Subscribe to Department Newsletter”, so that the Form Tag looks like the following. 2. Put the following function between the header tags. 3. Test your form by leaving out name and then submitting it. 9
  • 10. User Services Image Swapping Download the 2 gif files “button1a.gif” and “button1b.gif” from the J drive to your local folder. Type the following program into the same folder in file image.htm. Then test it out in Netscape Navigator. 10
  • 11. User Services Creationism. Using “this” and “new”. Creating your own objects and properties. You can create your own objects, properties and methods. This example is taken from “JavaScript for Dummies”. By using the new operator with a function you can define a new type of object. And you can add your own methods. Output 11
  • 12. A publication of User Services, a division of Information Technology Services, Mississippi State University Mike Rackley, Head Mississippi State University does not discriminate on the basis of race, color, religion, national origin, sex, age, disability, or veteran status.