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

Rubyonrails 090715105949-phpapp01
Rubyonrails 090715105949-phpapp01Rubyonrails 090715105949-phpapp01
Rubyonrails 090715105949-phpapp01sagaroceanic11
 
OSOM - Ruby on Rails
OSOM - Ruby on Rails OSOM - Ruby on Rails
OSOM - Ruby on Rails Marcela Oniga
 
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
 
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
 

Viewers also liked (6)

BPMS1
BPMS1BPMS1
BPMS1
 
Tutorial
TutorialTutorial
Tutorial
 
Rubyonrails 090715105949-phpapp01
Rubyonrails 090715105949-phpapp01Rubyonrails 090715105949-phpapp01
Rubyonrails 090715105949-phpapp01
 
OSOM - Ruby on Rails
OSOM - Ruby on Rails OSOM - Ruby on Rails
OSOM - Ruby on Rails
 
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>
 
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>
 

Similar to forms

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 forms (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
 
&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
 
Winter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20JavascriptWinter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20Javascripttutorialsruby
 
Winter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20JavascriptWinter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20Javascripttutorialsruby
 

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" />
 
&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
 
Winter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20JavascriptWinter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20Javascript
 
Winter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20JavascriptWinter%200405%20-%20Advanced%20Javascript
Winter%200405%20-%20Advanced%20Javascript
 

Recently uploaded

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
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
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
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
 
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
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 

Recently uploaded (20)

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
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
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.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
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
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...
 
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
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 

forms

  • 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