ŠĻą”±į>ž’ WYž’’’V’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’ģ„Į` ųæbjbjĖsĖs .B©©’’’’’’¤ÜÜÜÜÜÜÜšx+x+x+x+D¼+Lš2ö,*,*,*,*,---1ƒ1ƒ1ƒ1ƒ1ƒ1ƒ1$ų2h`5Š§1Ü-----§1ÜÜ*,*,Ū¼1111-.Ü*,Ü*,11-111ÜÜ1*,, ĄųŠ“RQĘx+3-11Ņ102106M/¢06106Ü1|--1-----§1§1ļ0---2----šššō „ šššō šššÜÜÜÜÜÜ’’’’ Creating an Email form with JavaScript Focus & Validation LAB - TEC236 Open Dreamweaver 8 Check ”I Want to Try Macromedia Dreamweaver” Create New > HTML Set Preference Edit > Preferences > Accessibility > Uncheck - Form Objects Open up your Pet Store template Clear out the center of the page if needed Save as signup.html Enter the Text - Sign Up for a Pet Store Logon - *required Set you cursor below the text Add a form Insert > Form > Form Set form Properties: Form Name: petform Action:  HYPERLINK "mailto:account22201@yahoo.com" mailto:account22201@yahoo.com Method: Post Target: leave Blank Class: None Enctype: text/plain Add Form Object 1 - name Inside the dotted form outline add the text – * Your Name: After the Text Insert a Form Object - Text Field Insert > Form > Text Field Set Text Field properties TextField: name Char width: 25 (this sets how wide the text field box will be) Max Chars: 40 (this sets the maximum number of characters the box can hold) Type: Single line Int Value: Leave Blank (any text you would enter here would show up in the box) Class: none After the above text box, hit enter to add the next Form Objects. Add Form Object 2 - email Inside the dotted form outline add the text – * Your Email: After the Text Insert a Form Object - Text Field Insert > Form > Text Field Set Text Field properties TextField: email Char width: 25 (this sets how wide the text field box will be) Max Chars: 40 (this sets the maximum number of characters the box can hold) Type: Single line Int Value: Leave Blank (any text you would enter here would show up in the box) Class: none Save Page View page File > Preview in Browser > Internet Explorer IE After the above text box, hit enter to add the next Form Objects. Add Form Object 3 - comments Inside the dotted form outline add the text – Comments: ( no asterisk , this box will not be required) Below the Text Insert a Form Object - Text Area Insert > Form > Text Area Set Text Field properties TextField: comments Char width: 45 (this sets how wide the text Area box will be) Num Lines: 4 (this sets the maximum number of characters the box can hold) Wrap: Default Type: Multi line Int Value: Leave Blank (any text you would enter here would show up in the box) Class: none Save Page View page File > Preview in Browser > Internet Explorer IE Add Form Object 3 – submit button Below the Text Insert a Form Object - Button Insert > Form > Button Set Text Field properties Button Name: Submit Value: Submit Action: Submit Form Class: none Save Page Add Form Object 4 – reset button Below the Text Insert a Form Object - Button Insert > Form > Button Set Text Field properties Button Name: Reset Value: Reset Form Action: Reset Form Class: none Save Page View page File > Preview in Browser > Internet Explorer IE Fill in form Test Reset Form button Adding Onload (giveFocus) JavaScript and Onsubmit JavaScript Validation ( will check that name and email fields have text before submitting the form). OnLoad (Give focus to the forms name text field) In Dreamweaver view the code View > Code Find the Body tag Add onLoad="giveFocus()" inside the body tag (this is the call to the giveFocus JavaScript function) Should look similar to: Add the giveFocus JavaScript Function right after the tag. Save Page Test that when the page loads the cursor is in the name text field box. Onsubmit JavaScript Validation In the page code find the form tag Should look similar to:
Add onsubmit="return Form_Validator(this)" inside the form tag (this is the call to the Form_Validator JavaScript function) Should look similar to: Add the Form_Validator JavaScript Function after the tag of the giveFocus function. function Form_Validator(Validate) { if (Validate.name.value == "") { alert("Please enter a value in the \"Name\" field."); Validate.name.focus(); return (false); } if (Validate.email.value == "") { alert("Please enter a value in the \"Email Address\" field."); Validate.email.focus(); return (false); } else { return true } } Save the Page Test the page: On loading the page the cursor should be in the Name text field Without entering anything into the form, click the Submit button Should receive an alert to enter a value in the Name field After clicking the alerts OK box the cursor should return to the name field Enter your name in the name field Without entering anything into the Email text field, click the Submit button Should receive an alert to enter a value in the Email field After clicking the alerts OK box the cursor should return to the Email field Enter your Email in the Email field Enter 5 lines of text in the Comments box, should give you a scroll bar &'/9:;K_d‚‹ ”°ĘÓķīļ; < P Q U c šįĻ½įĻ½į½°£™£°Œ~Œ£Œ°Œ°qc°VIh9^‚hæ: OJQJ^Jh9^‚h%3=OJQJ^Jh9^‚hĶÕ5OJQJ^Jh9^‚hĶÕOJQJ^Jh9^‚h“!5OJQJ^Jh9^‚h“!OJQJ^JhāOJQJ^Jh9^‚hāOJQJ^Jh9^‚h“mœOJQJ^J#h9^‚h“mœ5CJOJQJ^JaJ#h9^‚hā5CJOJQJ^JaJhā5CJOJQJ^JaJh+U05CJOJQJ^JaJ;JK^_Œ ”°īļ  ; < P Q ” • ³ “ æ Ą Ö ģ  Y żżżżżżżżżżżżżżżżżżżżżżżżżżōż„Š`„ŠgdhPžc j v ‚ ‡ “ ” “ æ Ö ź ė ģ  8 9 : W X Y ¦ ¾ æ Ą ī š ż öéÜŅéÅÜ·ÜŖŖŖŒŖxŒiŒŖ[·NÜéÜh9^‚h;4OJQJ^Jh9^‚h;45OJQJ^Jh9^‚hhP0JOJQJ^J'jh9^‚hhPOJQJU^J!jh9^‚hhPOJQJU^Jh9^‚hĶÕOJQJ^Jh9^‚hhPOJQJ^Jh9^‚h%3=5OJQJ^Jh9^‚h“mœOJQJ^Jh–lćOJQJ^Jh9^‚h%3=OJQJ^Jh9^‚hæ: OJQJ^Jh+U0OJQJ^JY h ~  „ ¦ æ Ą ü ż / 0 L M g x ¹   l y z ¼ ½ × Ų   H żżżżżżżżżżżżżżżżżżżżżżżųżóóógd,Ågd;4ż  . / L M f g Ų ß ź ō  % & ' 4 m x y z ¼ ½ × ņ ł ’”•žŸŖ«¬Ž"?‡ŖóęóęóęŁęŁĢŁĢŁæ²æ²æ²æ„²˜Š²Ģ²Ģ²Łę|n|„²„˜Š˜Ģ˜h9^‚h%3=5OJQJ^Jh9^‚h,Å5OJQJ^Jh9^‚h;45OJQJ^Jh9^‚h;4OJQJ^Jh9^‚h;nOJQJ^Jh9^‚h,ÅOJQJ^Jh9^‚hų\"OJQJ^Jh9^‚hāOJQJ^Jh9^‚hæ: OJQJ^Jh9^‚h%3=OJQJ^Jh9^‚h“!OJQJ^J*H I e f € ’ Ó !5†”•Ÿ ¬Žß!"?@©ŖŪÜ÷ų'śśśśśśśśśśųųųųųųóóóóóóóóóóóógd;4gd,ÅŖÆÖŚst…Œ—”“Ā5J~”ÉĻāč+?OY{*@›œž„óęŲęĖę¾ę¾ęóęŲęó°óĖóĖóĖóĖóĖ£ó°•£•£„uc#h9^‚h9^‚5CJOJQJ^JaJh9^‚5CJOJQJ^JaJ h9^‚h9^‚CJOJQJ^JaJh9^‚h9^‚5OJQJ^Jh9^‚h9^‚OJQJ^Jh9^‚h[cļ5OJQJ^Jh9^‚hāOJQJ^Jh9^‚hŽ&6OJQJ^Jh9^‚h;45OJQJ^Jh9^‚h;4OJQJ^Jh9^‚h[cļOJQJ^J$'g“ĀÕ&45?@L~”¢ŠŃéź+@NOYZśśńśśśśśśśśśģģģģģģģģģńģģģģgd[cļ„Š`„Šgd[cļgd;4Z{|Ŗ«ĆÄŽō*+56Btš›œžČ678ijśśśśśśśśśńńģśśśśśśśśśśśśśśśgd[cļ„Š`„Šgd9^‚gd9^‚„±ŃÜåęśż4568i±Åö÷ųü")0Z\qšįĻ½¬Ÿ•Ÿ•‹•}•p•f•f•Y•O•Y•YhāOJQJ^JhUc›hUc›OJQJ^JhF6ZOJQJ^Jh÷ hUc›OJQJ^JhUc›hUc›5OJQJ^Jh9^‚OJQJ^JhUc›OJQJ^Jh9^‚h9^‚OJQJ^J h9^‚hāCJOJQJ^JaJ#h9^‚hā5CJOJQJ^JaJ#h9^‚h9^‚5CJOJQJ^JaJhUc›5CJOJQJ^JaJhF6Z5CJOJQJ^JaJj‡”•§Ø÷0qrµ¶Õźģ +,uvw–—¾æśśśśśśśśśśõõššššššššššššššššgdUc›gd[cļgd9^‚qrz„˜“µ¶Ituw€‹”•—¬ĖŅ×$CEńäŚäŠĘŠ¹ŠÆŠÆ Ž|k]PÆFÆPÆPhāOJQJ^JhF6ZhF6ZOJQJ^JhF6ZCJOJQJ^JaJ h9^‚hāCJOJQJ^JaJ#h9^‚hā5CJOJQJ^JaJ#h9^‚hF6Z5CJOJQJ^JaJhF6Z5CJOJQJ^JaJhF6ZOJQJ^Jh÷ hUc›OJQJ^Jh9^‚OJQJ^JhUc›OJQJ^Jh÷ OJQJ^JhUc›hUc›OJQJ^Jh9^‚hUc›5OJQJ^Jæ×EFGHIJKLŠźė‚„āć)-g‚–—›śśśõõõõõõõõõõóóóóīīīīīīīīīīgd÷ gdF6ZgdUc›EFLU{ŠŽ¬ŗĻŠÜćźė‚„Œ›Æįāć|}~‹Œ°ąį+2go)0fóéßŅßéßéßóßČßé»® “†é†é|éŅ»oé|éeéeČeČeČehūLOJQJ^Jh9^‚h%3=OJQJ^Jh%3=OJQJ^JhUc›h÷ OJQJ^Jh9^‚h;nOJQJ^Jh9^‚h;45OJQJ^Jh9^‚h;4OJQJ^Jh÷ h÷ OJQJ^JhāOJQJ^Jh÷ h÷ OJQJ^JhF6ZOJQJ^Jh÷ OJQJ^JhUc›hF6ZOJQJ^J'›œæĆ"67;<IJmoqrs}~ŒŽ‘ ”įśśśśśśśśśśśśśśśśśśųųųųųųųųųųgd÷ įā#`­ŅÓ!_­ŌÕżżżżżżųųųųųųgdūL fnŌöģāÕh9^‚h’ucOJQJ^Jh’ucOJQJ^JhūLOJQJ^JhāOJQJ^J,1h°Š/ °ą=!°"°# $ %°°Š°Š ŠķDŠÉźyłŗĪŒ‚ŖK© mailto:account22201@yahoo.comąÉźyłŗĪŒ‚ŖK© <mailto:account22201@yahoo.com†œ@@ń’@ NormalCJ_HaJmH sH tH DA@ņ’”D Default Paragraph FontRi@ó’³R  Table Normalö4Ö l4Öaö (kō’Į(No List6U@¢ń6 hP Hyperlink >*B*ph’B ’’’’;JK^_Œ ”°īļ;<PQ”•³“æĄÖģYh~„¦æĄüż/0LMgx¹lyz¼½×ŲHIef€’Ó!5†”•Ÿ ¬Žß!"?@©ŖŪÜ÷ų'g“ĀÕ& 4 5 ? @ L ~  ” ¢ Š Ń é ź   + @ N O Y Z { | Ŗ « Ć Ä Ž ō   * + 5 6 B t š › œ  ž Č 6 7 8 i j ‡ ” • § Ø ÷  0 q r µ ¶ Õ ź ģ  +,uvw–—¾æ×EFGHIJKLŠźė‚„āć)-g‚–—›œæĆ"67;<IJmoqrs}~ŒŽ‘ ”įā#`­ŅÓ!_­ŌÕ˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜@0€€˜@0€€˜@0€€˜@0€€˜@0€€˜@0€€˜0€€˜@0€€˜0€€˜@0€€˜@0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜@0€€˜0€€˜@0€€˜0€€˜@0€€˜@0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜@0€€˜@0€€˜@0€€˜@0€€˜@0€€˜@0€€˜0€€˜0€€˜0€€˜@0€€˜0€€˜@0€€˜0€€˜@0€€˜@0€€˜0€€˜0€€˜0€€˜0€€˜@0€€˜0€€˜0€€˜0€€˜@0€€˜@0€€˜@0€€˜@0€€˜@0€€˜@0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜@0€€˜@0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€˜0€€æĄÖ¦z¼½×Ó!5†”ß!"?gĀÕ& 4 ? @ L  N O ō  * + 5 6 B ‡ ” • § Ø  0 q r Õ ź ģ  +,uvw—¾æ×EFKLŠźė‚„IJmoqrs}Ó!_­j‹0x€Uh‹0h‹0ģ0šōj‹0€j‹0ä’Xh‹0h‹0j‹0j‹0Uj‹0h‹0˜€€€h‹0€j‹0?č–Xh‹0>hĖ0jĖ0h‹0Bh‹0€h‹0€h‹0€š@0€€0j‹0GH”#Ļh‹0G€h‹0G€h‹0€h‹0€h‹0€h‹0€h‹0€j‹0OPt$Ļj‹0O€j‹0O€š€€€j‹0€c ż Ŗ„qEf Y H 'Zjæ›į 9WX’„š8š@ń’’’€€€÷š’šš0š( š ššB šS šæĖ’ ?š'/:;‚‡@I_fÖąĄÉ#9@…ŠÅŹ3<RYŸ¤ßäz~ĒŠåģ49swæ Č Ś į ™ ¢ “ » ē ķ ¹ Ć ÷ X a Õ Ż ō [dkunxćė  17k†ŒŸ”ĒĶ &,BFagPYöNX33333333333333333333333333333333333333333333<^Ÿ”°“æĄÕZhi~Ž„¦Ąhx½Ų“‡ž ¬"?Üų“ÖŃ ź    @ A X   ž Č j ‡ ˆ ” • § ÷  ź  +w‹ć‘ ‚‡å÷ æ: ų\"+U0;4Ž&6%3=Ŗ ?ūLhPF6ZŌ:`’uc;n9^‚ņ„“!Uc›“mœc@Ä,ÅĶÕā–lć[cļ’@€‡‡DĄcyy‡‡ą@’’Unknown’’’’’’’’’’’’G‡z €’Times New Roman5€Symbol3& ‡z €’Arial?5 ‡z €’Courier New"1ˆšŠhķŅ£:Õ£ '&÷ &&÷ &!š ““24d2ƒšHX)š’?ä’’’’’’’’’’’’’’’’’’’’’“mœ2’’CCreating an Email form with Javcascript Valadation - LAB - TEC236mkruegermkruegerž’ą…ŸņłOh«‘+'³Ł0“˜äš0 DP p | ˆ”œ¤¬äDCreating an Email form with Javcascript Valadation - LAB - TEC236 mkrueger Normal.dot mkrueger13Microsoft Office Word@ŖKłL@Ž¾bQĘ@‘£RQĘ&÷ž’ÕĶ՜.“—+,ł®DÕĶ՜.“—+,ł®x4 hp„Œ”œ ¤¬“¼ Ä ä planetlinks& Ø DCreating an Email form with Javcascript Valadation - LAB - TEC236 Title¼ 8@ _PID_HLINKSäAtlmailto:account22201@yahoo.comÖ  !ž’’’#$%&'()ž’’’+,-./0123456789:;<=>?@ABCDEž’’’GHIJKLMž’’’OPQRSTUž’’’ż’’’Xž’’’ž’’’ž’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’Root Entry’’’’’’’’ ĄFpņļ“RQĘZ€Data ’’’’’’’’’’’’"1Table’’’’*06WordDocument’’’’.BSummaryInformation(’’’’’’’’’’’’FDocumentSummaryInformation8’’’’’’’’NCompObj’’’’’’’’’’’’q’’’’’’’’’’’’ž’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’ž’ ’’’’ ĄFMicrosoft Office Word Document MSWordDocWord.Document.8ō9²q