Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions
 Discussion Forums
 HTML, XML, JavaScript...
 Software Reviews
 Editors,Others...
 Top100
 JavaScript Tutorials, ...
 Tutorials
 ASP, CSS, Databases...
 Discussion List
 FAQ, Roundup, Configure ...
 Authoring
 HTML, JavaScript, CSS...
 Design
 Layout, Navigation,...
 Graphics
 Tools, Colors, Images...
 Software
 Browsers, Editors, XML...
 Internet
 Domains, E-Commerce, ...
 WDVL Resources
  Intermdiate, Tutorials,...
 WDVL
 Discussion Lists, Top 100,...
 Technology Jobs


WDVL Newsletter

Active Server Pages
JSP/Java Servlets
Microsoft SQL Server
Daily Backup
Dedicated Servers
Streaming Audio/Video
24-hour Support    

jobs.webdeveloper.com

Hiermenus


e-commerce
Partner With Us















Developer Channel
FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

internet.com
IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


Top 10 Articles
  1. Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions
  2. JavaScript Tutorial for Programmers
  3. Design
  4. JavaScript Tutorial for Programmers - Objects
  5. JavaScript Tutorial for Programmers - JavaScript Grammar
  6. JavaScript Tutorial for Programmers - Versions of JavaScript
  7. Cascading Style Sheets
  8. JavaScript Tutorial for Programmers - Embedding JavaScript
  9. JavaScript Tutorial for Programmers - Functions
  10. Authoring JavaScript
Domain Name Lookup
Search to find the availability of a domain name. Just enter the complete domain name with extension (.com, .net, .edu)

The Button Widgets

The Submit Button Widget

  • So now you have all of these cool interface widgets with which you can collect user-defined input. But what do you do with them?

  • Well, at the end of your HTML FORM, you typically add a "SUBMIT BUTTON".

  • Submit buttons are easy to implement and take care of themselves.

  • When the user clicks the submit button, the browser will detect it and will put all the inputted data from the interface widgets into a URL encoded string and send it to the script specified in the FORM's ACTION attribute (again, we will talk about the script tomorrow).

  • A submit button appears below:

  • The code to create it looks like the following:

    	<FORM>
    	<INPUT TYPE = "SUBMIT">
    	</FORM>
    

Changing the Buttons Label

  • You can notice right away that by default, the web browser will use something like "Submit Query" for the button's label.

  • In many cases, you will not want that default text in the button.

  • To change it, you simply use the VALUE attribute of the INPUT tag as follows

  • The code to create it looks like the following:

    	<FORM>
    	<INPUT 	TYPE  = "SUBMIT" 
    		VALUE = "Oooooh, Touch me!"
    		>
    	</FORM>
    

Identifying the Button to the Server

  • In many cases, you may have more than one submit button in a form. Thus, you need a way of identifying which submit button is being pressed.

  • To do so, you will use the NAME attribute of the INPUT tags.

  • In the following example, we create two submit buttons with different names:

  • The code to create it looks like the following:

    	<FORM>
    	<INPUT 	TYPE 	= "SUBMIT"
    		VALUE 	= "Delete Item"
    		NAME 	= "delete"
    		>
    	<INPUT 	TYPE 	= "SUBMIT"
    		VALUE 	= "Modify Item"
    		NAME 	= "modify"
    		>
    	</FORM>
    

  • We will talk about how the server can use this information tomorrow.

The Text Area Widget
Table of Contents
The Reset Button Widget


Up to => Home / Authoring / Scripting / Tutorial




Jupiter Online Media: internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and Jupiter Online Media

Jupitermedia Corporate Info


Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers