The user interaction is through objects for data entry (text), dialing options (radio, checkbox and combo), buttons and links to other pages. See following a summary of each of these objects events.

 

OBJECT INPUT TEXT

The events associated with this object are: onchange, onblur, onfocus and onselect.

 

<form name = “TText”>

<p> Text Input <input type = text size = 20 maxlength = 30

name = “CxTexto” value = “” onchange = “alert (‘You entered’ +

CxTexto.value) “>

</ p>

</ form>

 

OBJECT INPUT PASSWORD

The events associated with this object are: onchange, onblur, onfocus and onselect.

 

<form name = “TPassword”>

<p> Password input <input type = password size = 10

maxlength = 10 name = “password” value = “”>

</ p>

</ form>

 

OBJECT CHECKBOX INPUT AND RADIO

The only event associated with these objects is onclick.

 

<p> Radio </ p>

<p> <input type = radio name = “Rad” value = “1”

onclick = “document.bgColor = ‘green'”> Green Fund

<input type = radio name = “Rad” value = “2”

onclick = “document.bgColor = ‘blueviolet'”> Violet Background

<input type = radio name = “Rad” value = “3”

onclick = “document.bgColor = ‘# FFFF00′”> Yellow Background

</ p>

 

OBJECT INPUT BUTTON

This object aims to create a button to which to peg logic operations to be performed when it is clicked. The only event associated with this object is onclick.

 

<p>

<form method = “POST” name = “TstButton”>

Enter a text <input type = text size = 30 maxlength = 30

name = “test” value = “”>

</ p> <p>

Click the button <input type = button name = “Btest” value = “Button

of test”

onclick = “alert (‘You entered’ + TstButton.Test.value)”>

</ p>

</ form>

 

OBJECT INPUT SUBMIT

This object is a button which aims to submit (send) the contents of the form to the server objects. The only event associated with this object is onclick.

 

OBJECT TEXTAREA

The events associated with this object are: onchange, onblur, onfocus and onselect.

 

SELECT OBJECT

To use this object, it is important knowledge of other associated properties:

 

  • Object.length: Returns the number of existing options in the list;
  • Object.selectedindex: Returns the “index” of the selected object (first = 0);
  • Object.options [index] .text: returns the external text associated with each option;
  • Object.options [index] .value: Returns the internal text (value) associated with each option;
  • Object.options [index] .selected: returns true or false.

 

The events associated with this object are: onchange, onblur and onfocus.

Finally, one of the most common objects in Javascript in interaction are the windows. To start working with windows, the general syntax is as follows:

Variable = window.open (“Url”, “Window Name”, “Options”)

  • Variable – name that will be assigned as property of the window.
  • Url – Internet address where the window opens. Normally uses up its own Url.
  • Window name – is the name that will appear in the window’s top (title)
  • Options – These are the options that define the window features, such as:

the toolbar – Creates a type of toolbar “Back”, “Forward”, etc;

the location – Open the browser’s location bar;

the directories – Open the toolbar type “What’s New”, “Handbook”, etc;

status – Opens a status bar in the bottom window;

the scrollbars – Opens vertical and horizontal scroll bars;

the menubar – Creates a menu bar type “File”, “Edit”, etc;

the resizable – Allows the user to resize the window;

the width – Specifies the width of the window in pixels;

the height – Specifies the window height in pixels.

All options (except width and height) are Boolean and can be set in two ways.

Example: “toolbar” or “toolbar = 1” are the same thing. If nothing is specified, it is understood that all options are linked; If you specify any option, it will be understood that it is connected only to informed choices. The Options are given separated by commas with no spaces between them.

You might also like…

PROCESAMIENTO AJAX EN SCRIPTCASE

Ajax en los formularios de Scriptcase puede usarse para recargar un campo de tipo de select basado e...

IMPORTAR IMAGENES DE LA BASE DE DATOS Y UTILIZAR CLASES DE BOOSTRAP

Como muchas personas ya saben, Bootstrap es una biblioteca de front-end libre y de código abierto p...

TENDENCIAS DE DESARROLLO WEB PARA 2017

Usted verá en este post tendencias para 2017 en Diseño Web, en el medio digital y en el desarrollo...

Comment this post

Get new posts, resources, offers and more each week.

We will use the information you provide to update you about our Newsletter and Special Offers. You can unsubscribe any time you want by clinck in a link in the footer of any email you receive from us, or by contacting us at sales@scriptcase.net. Learn more about our Privacy Police.