SlideShare a Scribd company logo
1 of 3
Download to read offline
HTML/JAVASCRIPT TUTORIAL FOR DESIGNERS
                 INTRODUCTION TO FORMS

                              MUD(TM) - TAKASHI OKAMOTO
                                  MUD@MUDPUB.COM




                                   1. Introduction
   In html you can generate things like: textboxes, drop down menus, checkboxes,
buttons, etc...simply by using forms. You can even use CSS 1 and make these ugly
system generated things look good and intergrate them to your design. Great
thing about using buttons generated using forms is that since it is generated by the
system2 there’s no need to download images. Anyway, here we will go over some of
what html can generate.

                                    2. The Code
2.1. Buttons. It is very simple to generate any form elements. We will first begin
with some basic rules and generate a button. Start by making yourself a blank
HTML file (ie. put in your html, head and body tags). Now, to generate a button,
we must first tell the browser that we are inserting a form by first inserting the
form tag. So start by putting in the following in the body:

<form></form>

   Within this form tag, we can generate form elements by placing an input tag
(<input>, closing not required) and specifying what type of input it is. In our
case, we want a button, so we set type="button". We also need to specify what
to display in the button. We can do that by specifying the value of it, so let
value="BUTTON" thus generating a button called “BUTTON”. So type in the fol-
lowing and see what it looks like:

<html>
   <head>
   </head>
   <body>
      <form>
         <input type="button" value="BUTTON">
      </form>
   </body>
</html>


  Date: October 30, 2003.
  1
    Cascading Style Sheets.
  2
    ie. the browser.
                                          1
2                 MUD(TM) - TAKASHI OKAMOTO MUD@MUDPUB.COM


  Pretty ugly, right? That’s why if you want to use form elements that are system
generated, we need to customize it. The easiest way is to use an external css file
and specifying a class.

   So lets first create a new file and call it “forms.css”. We should start by creating
a new class, call it button and stick in some features. Make whatever changes you
like, and see what happens. Remember to tell CSS you are defining a new class,
you need to start the name with a ‘.’3. Here I have a sample class:

.button {
   color: #a3a3a3; font-weight: normal; font-size: 24px; border-style:0; border:1pt
   #7C7C7C dotted; color: #7C7C7C; font-family: Arial, Helvetica, Geneva, Swiss,
   SunSans-Regular
}

  Now, save the css file, open up your previous html file and link the css in the
header. If you forgot how, here it is. Just stick this within the <head> tag4:

<link href="forms.css" rel="styleSheet" type="text/css">

   Now, we need to tell the generated button to have the features of the new
class ”button” that we defined. In the ¡input¿ tag, just add an attribute called
class=”button”:

<input type="button" value="BUTTON" class="button">

    Now, save it and preview the button again. Looks cooler right?

  exercise: Open the html file in different browsers and note the difference in
appearance.

  exercise: Play around with different attributes of .button and see what changes
what5.

   Now, as you can see from the first exercise, the styles of the button changes
from browser to browser. There is no way around this, since the appearance of the
button as well as any other form element is dependent on the browser.

2.2. Other Form Elements. How do we generate other form elements? Well, it’s
easy as generating a button. For instance, if you want a text field, just set your input
type to type="text". If you want a checkbox, set the type to type="checkbox".

   exercise: Generate a text field, checkbox and look up and generate other input
elements.

    3
      A period.
    4
      Make sure you have both the html and css file in the same directory.
    5
      You might want to consult the W3C website: http://www.w3.org/ or get something like the
css handbook from O’Reilly (It’s about $10 - $15).
HTML/JAVASCRIPT TUTORIAL FOR DESIGNERS               INTRODUCTION TO FORMS          3


2.3. Select Tag. To generate a drop down menu is a bit different, since it is not
an input element. Instead you would use the tag <select></select> and have an
<option></option> tag within to list all the options to a drop down menu. Try
something like:

<select>
   <option   selected>select site</option>
   <option   value="#">--------------------</option>
   <option   value="http://www.mudnetwork.com/">mud.network(tm)</option>
   <option   value="http://www.mudclub.org/">mudclub.org</option>
   <option   value="#">--------------------</option>
</select>

  Stick this inside <form> and preview it in different browsers.

  exercise: Using css, make the form elements you generated above look cooler.

   That’s pretty much all you need to know about how to generate form elements.
But remember how html really doesn’t do much? It generates all these form ele-
ments; but without the help of other scripts (eg. javascript/perl), we can’t do much
with them. Future exercises will show you how you can integrate these scripts.
mud dropnav will teach you how to change URL’s based on what drop down menu
item you select; mud mailinglist and mud contact will show you how to down-
load, install, integrate and customize a widely used perl script called formmail.pl
to set up an automated mailing list subscriber and an email form that lets users
email you via http rather than an email client, which comes in handy when they
are using libraries or internet caf´’s.
                                   e

                                     References
1. D. Goodman, Dynamic HTML. 2nd Ed. O’Reilly & Associates, Cambridge, 2002.
2. D. Flanagan, Javascript: The Definitive Guide. 4th Ed. O’Reilly & Associates, Cambridge,
   2002.
3. The W3C website, http://www.w3c.org/.
Typeset using L TEX 2ε for Darwin, AMS package under Mac OS X and TeXShop.
              A

More Related Content

What's hot

Html Server Anchor Control VB
Html Server Anchor Control VBHtml Server Anchor Control VB
Html Server Anchor Control VBsunmitraeducation
 
Lesson 2 cs5
Lesson 2   cs5Lesson 2   cs5
Lesson 2 cs5dtelepos
 
Printable version (must have Word)
Printable version (must have Word)Printable version (must have Word)
Printable version (must have Word)butest
 
basic tutorial for frontpage 2003
basic tutorial for frontpage 2003basic tutorial for frontpage 2003
basic tutorial for frontpage 2003israeljumbo
 
Accessible custom radio buttons and checkboxes
Accessible custom radio buttons and checkboxesAccessible custom radio buttons and checkboxes
Accessible custom radio buttons and checkboxesRuss Weakley
 
Lesson 5 cs5
Lesson 5   cs5Lesson 5   cs5
Lesson 5 cs5dtelepos
 
Lesson 3 cs5
Lesson 3   cs5Lesson 3   cs5
Lesson 3 cs5dtelepos
 
Google chrome developer and tags
Google chrome developer and tagsGoogle chrome developer and tags
Google chrome developer and tagsgreg robertson
 
bawawjspdx082117
bawawjspdx082117bawawjspdx082117
bawawjspdx082117Thinkful
 
Html web designing 1
Html web designing 1Html web designing 1
Html web designing 1mannely
 
Web designing (2) - CSS Basic Coding
Web designing (2) - CSS Basic CodingWeb designing (2) - CSS Basic Coding
Web designing (2) - CSS Basic CodingRabiul robi
 
Introduction to html (912 kb)
Introduction to html (912 kb)Introduction to html (912 kb)
Introduction to html (912 kb)IMRAN KHAN
 
Build an App with JavaScript & jQuery
Build an App with JavaScript & jQuery Build an App with JavaScript & jQuery
Build an App with JavaScript & jQuery Aaron Lamphere
 
Learn CSS From Scratch
Learn CSS From ScratchLearn CSS From Scratch
Learn CSS From Scratchecobold
 
Html Server Anchor Control CS
Html Server Anchor Control CSHtml Server Anchor Control CS
Html Server Anchor Control CSsunmitraeducation
 
Creating Acessible floating labels
Creating Acessible floating labelsCreating Acessible floating labels
Creating Acessible floating labelsRuss Weakley
 
feelDweb official guide
feelDweb official guidefeelDweb official guide
feelDweb official guideSuperestratega
 
Customizing Your WordPress Theme Using Firebug and Basic CSS
Customizing Your WordPress Theme Using Firebug and Basic CSSCustomizing Your WordPress Theme Using Firebug and Basic CSS
Customizing Your WordPress Theme Using Firebug and Basic CSSLaura Hartwig
 

What's hot (20)

Fewd week8 slides
Fewd week8 slidesFewd week8 slides
Fewd week8 slides
 
Html Server Anchor Control VB
Html Server Anchor Control VBHtml Server Anchor Control VB
Html Server Anchor Control VB
 
Lesson 2 cs5
Lesson 2   cs5Lesson 2   cs5
Lesson 2 cs5
 
Printable version (must have Word)
Printable version (must have Word)Printable version (must have Word)
Printable version (must have Word)
 
basic tutorial for frontpage 2003
basic tutorial for frontpage 2003basic tutorial for frontpage 2003
basic tutorial for frontpage 2003
 
Accessible custom radio buttons and checkboxes
Accessible custom radio buttons and checkboxesAccessible custom radio buttons and checkboxes
Accessible custom radio buttons and checkboxes
 
Lesson 5 cs5
Lesson 5   cs5Lesson 5   cs5
Lesson 5 cs5
 
Lesson 3 cs5
Lesson 3   cs5Lesson 3   cs5
Lesson 3 cs5
 
Google chrome developer and tags
Google chrome developer and tagsGoogle chrome developer and tags
Google chrome developer and tags
 
bawawjspdx082117
bawawjspdx082117bawawjspdx082117
bawawjspdx082117
 
Html web designing 1
Html web designing 1Html web designing 1
Html web designing 1
 
Web designing (2) - CSS Basic Coding
Web designing (2) - CSS Basic CodingWeb designing (2) - CSS Basic Coding
Web designing (2) - CSS Basic Coding
 
Introduction to html (912 kb)
Introduction to html (912 kb)Introduction to html (912 kb)
Introduction to html (912 kb)
 
Build an App with JavaScript & jQuery
Build an App with JavaScript & jQuery Build an App with JavaScript & jQuery
Build an App with JavaScript & jQuery
 
Learn CSS From Scratch
Learn CSS From ScratchLearn CSS From Scratch
Learn CSS From Scratch
 
Html Server Anchor Control CS
Html Server Anchor Control CSHtml Server Anchor Control CS
Html Server Anchor Control CS
 
Creating Acessible floating labels
Creating Acessible floating labelsCreating Acessible floating labels
Creating Acessible floating labels
 
feelDweb official guide
feelDweb official guidefeelDweb official guide
feelDweb official guide
 
Deck 6-456 (1)
Deck 6-456 (1)Deck 6-456 (1)
Deck 6-456 (1)
 
Customizing Your WordPress Theme Using Firebug and Basic CSS
Customizing Your WordPress Theme Using Firebug and Basic CSSCustomizing Your WordPress Theme Using Firebug and Basic CSS
Customizing Your WordPress Theme Using Firebug and Basic CSS
 

Viewers also liked

Diabetes Ebook:GLUCOSE TOLERANCE
Diabetes Ebook:GLUCOSE TOLERANCEDiabetes Ebook:GLUCOSE TOLERANCE
Diabetes Ebook:GLUCOSE TOLERANCEDiseaseSolution
 
Ood启思录01
Ood启思录01Ood启思录01
Ood启思录01yiditushe
 
H O W T O L I V E I N H A R M O N Y D R S H R I N I W A S K A S H A L ...
H O W  T O  L I V E  I N  H A R M O N Y  D R  S H R I N I W A S  K A S H A L ...H O W  T O  L I V E  I N  H A R M O N Y  D R  S H R I N I W A S  K A S H A L ...
H O W T O L I V E I N H A R M O N Y D R S H R I N I W A S K A S H A L ...banothkishan
 
T H E C O R E O F S E X D R S H R I N I W A S K A S H A L I K A R
T H E  C O R E  O F  S E X  D R  S H R I N I W A S  K A S H A L I K A RT H E  C O R E  O F  S E X  D R  S H R I N I W A S  K A S H A L I K A R
T H E C O R E O F S E X D R S H R I N I W A S K A S H A L I K A Rbanothkishan
 
Top 5 páginas de internet mas extrañas
Top 5 páginas de internet mas extrañasTop 5 páginas de internet mas extrañas
Top 5 páginas de internet mas extrañasMauIL Izquierdo Luna
 
PROCESSOS DE ENSINO E DE APRENDIZAGEM: FORMANDO PROFESSORES EM UM PROGRAMA ES...
PROCESSOS DE ENSINO E DE APRENDIZAGEM: FORMANDO PROFESSORES EM UM PROGRAMA ES...PROCESSOS DE ENSINO E DE APRENDIZAGEM: FORMANDO PROFESSORES EM UM PROGRAMA ES...
PROCESSOS DE ENSINO E DE APRENDIZAGEM: FORMANDO PROFESSORES EM UM PROGRAMA ES...ProfessorPrincipiante
 
Hermell Products Mini Product Catalog for Health and Wellness
Hermell Products Mini Product Catalog for Health and WellnessHermell Products Mini Product Catalog for Health and Wellness
Hermell Products Mini Product Catalog for Health and WellnessAllie McConnell
 
Reseña bibliografica, apartheid del siglo xxi
Reseña bibliografica, apartheid del siglo xxiReseña bibliografica, apartheid del siglo xxi
Reseña bibliografica, apartheid del siglo xxiZaibet Caceres
 
Quest ir presentation v7
Quest ir presentation v7Quest ir presentation v7
Quest ir presentation v7qrhc
 
TradeEQ Science Of Success
TradeEQ Science Of SuccessTradeEQ Science Of Success
TradeEQ Science Of Successguest979f00
 
The Heart of KOOBFACE
The Heart of KOOBFACEThe Heart of KOOBFACE
The Heart of KOOBFACETrend Micro
 
How To Create A Digital Story
How To Create A Digital StoryHow To Create A Digital Story
How To Create A Digital StoryTechSoup
 

Viewers also liked (19)

Diabetes Ebook:GLUCOSE TOLERANCE
Diabetes Ebook:GLUCOSE TOLERANCEDiabetes Ebook:GLUCOSE TOLERANCE
Diabetes Ebook:GLUCOSE TOLERANCE
 
Ood启思录01
Ood启思录01Ood启思录01
Ood启思录01
 
H O W T O L I V E I N H A R M O N Y D R S H R I N I W A S K A S H A L ...
H O W  T O  L I V E  I N  H A R M O N Y  D R  S H R I N I W A S  K A S H A L ...H O W  T O  L I V E  I N  H A R M O N Y  D R  S H R I N I W A S  K A S H A L ...
H O W T O L I V E I N H A R M O N Y D R S H R I N I W A S K A S H A L ...
 
spraa64
spraa64spraa64
spraa64
 
SIO_110_syllabus
SIO_110_syllabusSIO_110_syllabus
SIO_110_syllabus
 
T H E C O R E O F S E X D R S H R I N I W A S K A S H A L I K A R
T H E  C O R E  O F  S E X  D R  S H R I N I W A S  K A S H A L I K A RT H E  C O R E  O F  S E X  D R  S H R I N I W A S  K A S H A L I K A R
T H E C O R E O F S E X D R S H R I N I W A S K A S H A L I K A R
 
CV_MCC_EN
CV_MCC_ENCV_MCC_EN
CV_MCC_EN
 
Top 5 páginas de internet mas extrañas
Top 5 páginas de internet mas extrañasTop 5 páginas de internet mas extrañas
Top 5 páginas de internet mas extrañas
 
cuidados del agua
cuidados del aguacuidados del agua
cuidados del agua
 
PROCESSOS DE ENSINO E DE APRENDIZAGEM: FORMANDO PROFESSORES EM UM PROGRAMA ES...
PROCESSOS DE ENSINO E DE APRENDIZAGEM: FORMANDO PROFESSORES EM UM PROGRAMA ES...PROCESSOS DE ENSINO E DE APRENDIZAGEM: FORMANDO PROFESSORES EM UM PROGRAMA ES...
PROCESSOS DE ENSINO E DE APRENDIZAGEM: FORMANDO PROFESSORES EM UM PROGRAMA ES...
 
Hermell Products Mini Product Catalog for Health and Wellness
Hermell Products Mini Product Catalog for Health and WellnessHermell Products Mini Product Catalog for Health and Wellness
Hermell Products Mini Product Catalog for Health and Wellness
 
Reseña bibliografica, apartheid del siglo xxi
Reseña bibliografica, apartheid del siglo xxiReseña bibliografica, apartheid del siglo xxi
Reseña bibliografica, apartheid del siglo xxi
 
Physician Assistant Prescribing
Physician Assistant PrescribingPhysician Assistant Prescribing
Physician Assistant Prescribing
 
Venice Carnaval 2008
Venice Carnaval 2008Venice Carnaval 2008
Venice Carnaval 2008
 
Helpless Dr
Helpless       DrHelpless       Dr
Helpless Dr
 
Quest ir presentation v7
Quest ir presentation v7Quest ir presentation v7
Quest ir presentation v7
 
TradeEQ Science Of Success
TradeEQ Science Of SuccessTradeEQ Science Of Success
TradeEQ Science Of Success
 
The Heart of KOOBFACE
The Heart of KOOBFACEThe Heart of KOOBFACE
The Heart of KOOBFACE
 
How To Create A Digital Story
How To Create A Digital StoryHow To Create A Digital Story
How To Create A Digital Story
 

Similar to HTML/JavaScript Forms Tutorial

ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010
ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010
ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010vchircu
 
Introduction to whats new in css3
Introduction to whats new in css3Introduction to whats new in css3
Introduction to whats new in css3Usman Mehmood
 
Access tips access and sql part 4 building select queries on-the-fly
Access tips  access and sql part 4  building select queries on-the-flyAccess tips  access and sql part 4  building select queries on-the-fly
Access tips access and sql part 4 building select queries on-the-flyquest2900
 
BP304 - Blog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
BP304 - Blog It Up, Baby! Extending the new IBM Lotus Domino Blog TemplateBP304 - Blog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
BP304 - Blog It Up, Baby! Extending the new IBM Lotus Domino Blog TemplateSean Burgess
 
Blog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
Blog It Up, Baby! Extending the new IBM Lotus Domino Blog TemplateBlog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
Blog It Up, Baby! Extending the new IBM Lotus Domino Blog TemplateSean Burgess
 
Html interview-questions-and-answers
Html interview-questions-and-answersHtml interview-questions-and-answers
Html interview-questions-and-answersMohitKumar1985
 
Nvu tutorial1 1
Nvu tutorial1 1Nvu tutorial1 1
Nvu tutorial1 1RJOROZCO
 
Drupal For Dummies
Drupal For DummiesDrupal For Dummies
Drupal For DummiesKoen Delvaux
 
Conquering Code with hjc
Conquering Code with hjcConquering Code with hjc
Conquering Code with hjchjc
 
Introduction to HTML-CSS-Javascript.pdf
Introduction to HTML-CSS-Javascript.pdfIntroduction to HTML-CSS-Javascript.pdf
Introduction to HTML-CSS-Javascript.pdfDakshPratapSingh1
 
Build an App with JavaScript and jQuery - LA - July 18
Build an App with JavaScript and jQuery - LA - July 18Build an App with JavaScript and jQuery - LA - July 18
Build an App with JavaScript and jQuery - LA - July 18Thinkful
 
Basic CSS concepts by naveen kumar veligeti
Basic CSS concepts by naveen kumar veligetiBasic CSS concepts by naveen kumar veligeti
Basic CSS concepts by naveen kumar veligetiNaveen Kumar Veligeti
 
Documentation For Tab Setup
Documentation For Tab SetupDocumentation For Tab Setup
Documentation For Tab Setupvkeeton
 
Cis407 a ilab 2 web application development devry university
Cis407 a ilab 2 web application development devry universityCis407 a ilab 2 web application development devry university
Cis407 a ilab 2 web application development devry universitylhkslkdh89009
 
Create a meteor chat app in 30 minutes
Create a meteor chat app in 30 minutesCreate a meteor chat app in 30 minutes
Create a meteor chat app in 30 minutesDesignveloper
 
Optimizing Drupal 7 HTML Markup - Using Panels, Page Manager, and Fences to P...
Optimizing Drupal 7 HTML Markup - Using Panels, Page Manager, and Fences to P...Optimizing Drupal 7 HTML Markup - Using Panels, Page Manager, and Fences to P...
Optimizing Drupal 7 HTML Markup - Using Panels, Page Manager, and Fences to P...Jim Birch
 

Similar to HTML/JavaScript Forms Tutorial (20)

ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010
ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010
ChircuVictor StefircaMadalin rad_aspmvc3_wcf_vs2010
 
Introduction to whats new in css3
Introduction to whats new in css3Introduction to whats new in css3
Introduction to whats new in css3
 
Access tips access and sql part 4 building select queries on-the-fly
Access tips  access and sql part 4  building select queries on-the-flyAccess tips  access and sql part 4  building select queries on-the-fly
Access tips access and sql part 4 building select queries on-the-fly
 
BP304 - Blog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
BP304 - Blog It Up, Baby! Extending the new IBM Lotus Domino Blog TemplateBP304 - Blog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
BP304 - Blog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
 
Blog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
Blog It Up, Baby! Extending the new IBM Lotus Domino Blog TemplateBlog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
Blog It Up, Baby! Extending the new IBM Lotus Domino Blog Template
 
Html interview-questions-and-answers
Html interview-questions-and-answersHtml interview-questions-and-answers
Html interview-questions-and-answers
 
Nvu tutorial1 1
Nvu tutorial1 1Nvu tutorial1 1
Nvu tutorial1 1
 
ASP.NET MVC3 RAD
ASP.NET MVC3 RADASP.NET MVC3 RAD
ASP.NET MVC3 RAD
 
Create Components in TomatoCMS
Create Components in TomatoCMSCreate Components in TomatoCMS
Create Components in TomatoCMS
 
Drupal For Dummies
Drupal For DummiesDrupal For Dummies
Drupal For Dummies
 
Conquering Code with hjc
Conquering Code with hjcConquering Code with hjc
Conquering Code with hjc
 
Introduction to HTML-CSS-Javascript.pdf
Introduction to HTML-CSS-Javascript.pdfIntroduction to HTML-CSS-Javascript.pdf
Introduction to HTML-CSS-Javascript.pdf
 
Build an App with JavaScript and jQuery - LA - July 18
Build an App with JavaScript and jQuery - LA - July 18Build an App with JavaScript and jQuery - LA - July 18
Build an App with JavaScript and jQuery - LA - July 18
 
Basic CSS concepts by naveen kumar veligeti
Basic CSS concepts by naveen kumar veligetiBasic CSS concepts by naveen kumar veligeti
Basic CSS concepts by naveen kumar veligeti
 
Documentation For Tab Setup
Documentation For Tab SetupDocumentation For Tab Setup
Documentation For Tab Setup
 
WEB DEVELOPMENT
WEB DEVELOPMENTWEB DEVELOPMENT
WEB DEVELOPMENT
 
Knockout in action
Knockout in actionKnockout in action
Knockout in action
 
Cis407 a ilab 2 web application development devry university
Cis407 a ilab 2 web application development devry universityCis407 a ilab 2 web application development devry university
Cis407 a ilab 2 web application development devry university
 
Create a meteor chat app in 30 minutes
Create a meteor chat app in 30 minutesCreate a meteor chat app in 30 minutes
Create a meteor chat app in 30 minutes
 
Optimizing Drupal 7 HTML Markup - Using Panels, Page Manager, and Fences to P...
Optimizing Drupal 7 HTML Markup - Using Panels, Page Manager, and Fences to P...Optimizing Drupal 7 HTML Markup - Using Panels, Page Manager, and Fences to P...
Optimizing Drupal 7 HTML Markup - Using Panels, Page Manager, and Fences to P...
 

More from tutorialsruby

&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />tutorialsruby
 
TopStyle Help &amp; &lt;b>Tutorial&lt;/b>
TopStyle Help &amp; &lt;b>Tutorial&lt;/b>TopStyle Help &amp; &lt;b>Tutorial&lt;/b>
TopStyle Help &amp; &lt;b>Tutorial&lt;/b>tutorialsruby
 
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>tutorialsruby
 
&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />tutorialsruby
 
&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;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 – INS0tutorialsruby
 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa0602690047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269tutorialsruby
 
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa0602690047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269
0047ecaa6ea3e9ac0a13a2fe96f4de3bfd515c88f5d90c1fae79b956363d7f02c7fa060269tutorialsruby
 
BloggingWithStyle_2008
BloggingWithStyle_2008BloggingWithStyle_2008
BloggingWithStyle_2008tutorialsruby
 
BloggingWithStyle_2008
BloggingWithStyle_2008BloggingWithStyle_2008
BloggingWithStyle_2008tutorialsruby
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheetstutorialsruby
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheetstutorialsruby
 

More from tutorialsruby (20)

&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />
 
TopStyle Help &amp; &lt;b>Tutorial&lt;/b>
TopStyle Help &amp; &lt;b>Tutorial&lt;/b>TopStyle Help &amp; &lt;b>Tutorial&lt;/b>
TopStyle Help &amp; &lt;b>Tutorial&lt;/b>
 
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>
The Art Institute of Atlanta IMD 210 Fundamentals of Scripting &lt;b>...&lt;/b>
 
&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />
 
&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;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

Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 

HTML/JavaScript Forms Tutorial

  • 1. HTML/JAVASCRIPT TUTORIAL FOR DESIGNERS INTRODUCTION TO FORMS MUD(TM) - TAKASHI OKAMOTO MUD@MUDPUB.COM 1. Introduction In html you can generate things like: textboxes, drop down menus, checkboxes, buttons, etc...simply by using forms. You can even use CSS 1 and make these ugly system generated things look good and intergrate them to your design. Great thing about using buttons generated using forms is that since it is generated by the system2 there’s no need to download images. Anyway, here we will go over some of what html can generate. 2. The Code 2.1. Buttons. It is very simple to generate any form elements. We will first begin with some basic rules and generate a button. Start by making yourself a blank HTML file (ie. put in your html, head and body tags). Now, to generate a button, we must first tell the browser that we are inserting a form by first inserting the form tag. So start by putting in the following in the body: <form></form> Within this form tag, we can generate form elements by placing an input tag (<input>, closing not required) and specifying what type of input it is. In our case, we want a button, so we set type="button". We also need to specify what to display in the button. We can do that by specifying the value of it, so let value="BUTTON" thus generating a button called “BUTTON”. So type in the fol- lowing and see what it looks like: <html> <head> </head> <body> <form> <input type="button" value="BUTTON"> </form> </body> </html> Date: October 30, 2003. 1 Cascading Style Sheets. 2 ie. the browser. 1
  • 2. 2 MUD(TM) - TAKASHI OKAMOTO MUD@MUDPUB.COM Pretty ugly, right? That’s why if you want to use form elements that are system generated, we need to customize it. The easiest way is to use an external css file and specifying a class. So lets first create a new file and call it “forms.css”. We should start by creating a new class, call it button and stick in some features. Make whatever changes you like, and see what happens. Remember to tell CSS you are defining a new class, you need to start the name with a ‘.’3. Here I have a sample class: .button { color: #a3a3a3; font-weight: normal; font-size: 24px; border-style:0; border:1pt #7C7C7C dotted; color: #7C7C7C; font-family: Arial, Helvetica, Geneva, Swiss, SunSans-Regular } Now, save the css file, open up your previous html file and link the css in the header. If you forgot how, here it is. Just stick this within the <head> tag4: <link href="forms.css" rel="styleSheet" type="text/css"> Now, we need to tell the generated button to have the features of the new class ”button” that we defined. In the ¡input¿ tag, just add an attribute called class=”button”: <input type="button" value="BUTTON" class="button"> Now, save it and preview the button again. Looks cooler right? exercise: Open the html file in different browsers and note the difference in appearance. exercise: Play around with different attributes of .button and see what changes what5. Now, as you can see from the first exercise, the styles of the button changes from browser to browser. There is no way around this, since the appearance of the button as well as any other form element is dependent on the browser. 2.2. Other Form Elements. How do we generate other form elements? Well, it’s easy as generating a button. For instance, if you want a text field, just set your input type to type="text". If you want a checkbox, set the type to type="checkbox". exercise: Generate a text field, checkbox and look up and generate other input elements. 3 A period. 4 Make sure you have both the html and css file in the same directory. 5 You might want to consult the W3C website: http://www.w3.org/ or get something like the css handbook from O’Reilly (It’s about $10 - $15).
  • 3. HTML/JAVASCRIPT TUTORIAL FOR DESIGNERS INTRODUCTION TO FORMS 3 2.3. Select Tag. To generate a drop down menu is a bit different, since it is not an input element. Instead you would use the tag <select></select> and have an <option></option> tag within to list all the options to a drop down menu. Try something like: <select> <option selected>select site</option> <option value="#">--------------------</option> <option value="http://www.mudnetwork.com/">mud.network(tm)</option> <option value="http://www.mudclub.org/">mudclub.org</option> <option value="#">--------------------</option> </select> Stick this inside <form> and preview it in different browsers. exercise: Using css, make the form elements you generated above look cooler. That’s pretty much all you need to know about how to generate form elements. But remember how html really doesn’t do much? It generates all these form ele- ments; but without the help of other scripts (eg. javascript/perl), we can’t do much with them. Future exercises will show you how you can integrate these scripts. mud dropnav will teach you how to change URL’s based on what drop down menu item you select; mud mailinglist and mud contact will show you how to down- load, install, integrate and customize a widely used perl script called formmail.pl to set up an automated mailing list subscriber and an email form that lets users email you via http rather than an email client, which comes in handy when they are using libraries or internet caf´’s. e References 1. D. Goodman, Dynamic HTML. 2nd Ed. O’Reilly & Associates, Cambridge, 2002. 2. D. Flanagan, Javascript: The Definitive Guide. 4th Ed. O’Reilly & Associates, Cambridge, 2002. 3. The W3C website, http://www.w3c.org/. Typeset using L TEX 2ε for Darwin, AMS package under Mac OS X and TeXShop. A