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)

Image Input

Image Input

  • HTML Forms give you a new way to use images to send information.

  • Specifically, you can use the INPUT tag to send information about where (or if) a user has clicked on an image.

  • Like all INPUT tags, the IMAGE takes a NAME and a TYPE attribute. The TYPE attribute should be "IMAGE".

  • The NAME attribute however should be set to some value that relates to the image being clicked. This NAME will be used to specify which image was pressed and will be sent with the coordinates of the mouse click as name/value pairs in the HTTP message body. Specifically, the browser will add something like the following to the HTTP body if you click on an input image.

    imagename.x=somnumber&imagename.y=somenumber
    

  • Of course, the basic tag also needs a value for the SRC attribute that defines where the image to be displayed is located.

  • Take a look at the following example:

  • The code to get the following input image is listed below:

    <FORM>
       <INPUT TYPE 	= "IMAGE"
       	  NAME 	= "afraid_icon" 
              SRC 	= "Images/afraid_icon.gif"
    	  >
    </FORM>
    

  • From above, if we clicked on this image at the point (10,20), the browser would add the following to the HTTP body:

    afraid_icon.x=10&afraid_icon.y=20
    

Image Alignment and Style.

  • As with most images in HTML, you can easily align the image with the ALIGN attribute that takes values of TOP, MIDDLE, or BOTTOM.

  • Similarly you can take away the blue highlight box around the image by specifying BORDER = "0".

  • Consider the following example:
    Here is some text. Where will it be placed?

    Here is some text. Where will it be placed?

  • The code for those two input buttons is shown below:

    <FORM ACTION = "POST"> <Here is some text.
    Where will it be placed?
    <INPUT 	TYPE 	= "IMAGE"
    	NAME 	= "afraid_icon" 
           	SRC 	= "Images/afraid_icon.gif"
    	BORDER 	= "0"
            ALIGN 	= "TOP"
    	>
    
    <P>
    
    Here is some text. Where will it be placed?
    <INPUT 	TYPE 	= "IMAGE"
    	NAME 	= "afraid_icon" 
           	SRC 	= "Images/afraid_icon.gif"
    	BORDER 	= "3"
            ALIGN 	= "BOTTOM"
    	>
    </FORM>
    

Hidden Widgets
Table of Contents
File Upload 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