Onfocus and onblur, PHP Web Programming

Assignment Help:

The onFocus event handler executes the mentioned JavaScript code or function on the occurrence of a focus event. It is while a window, frame or form element is given the focus. It can be caused through the user clicking on the current frame, window, or form element, using the TAB key to cycle through the several elements on screen, or a call to window .focus method. Be aware that assigning alert box to object's onFocus event handler will result in recurrent alerts as pressing the 'OK'

<SCRIPT LANGUAGE="JAVASCRIPT">

s1 = new String(myform.myText.value)

function changeVal() {

s1 = "I'm feeling focused" document.myform.myText.value  = s1.toUpperCase()

}

</SCRIPT>

</HTML>

2452_OnFocus and onBlur.png

Figure: Using the onFocus Method

onblur = script

The onBlur event handler executes the denoted JavaScript code or function onto the occurrence of blur event. This is while a window, frame or form element loses focus. It can be caused through the user clicking outside of the current window, frame or form element, using the TAB key to cycle through the several elements on screen, or by a call to the window.blur method.

The onBlur event handler employee the Event objects properties. type - this property denote the type of event. target - this property denote the object to which the event was sent originally.

The following instance illustrate the use of the onBlur event handler to ask the user to check that the details given are correct. Note the first line is HTML code.

<HTML>

<HEAD>

</HEAD>

<BODY>

<FORM NAME = "myform" >

Enter email address <INPUT TYPE="text" VALUE="" NAME="userEmail" onBlur=addCheck( )>

</BODY>

<SCRIPT LANGUAGE="JAVASCRIPT">

function addCheck() {

alert("Please check your email are correct before submitting")

}

</SCRIPT>

</HTML>


Related Discussions:- Onfocus and onblur

Help needed with blog setup, Help Needed with Blog Setup, Links, Pages and ...

Help Needed with Blog Setup, Links, Pages and General Finalization Want help finalizing all links all around darlenekujanek.com. 1) Internal page linking 2) Setting up add

Establish a database connection to a mysql server, Question: (a) What ...

Question: (a) What PHP code snippet is used to establish a database connection to a MySQL server using the MySQL improved API? (b) What are the advantages of using sto

Status bar, #question.please help source code to display status bar code .

#question.please help source code to display status bar code .

I need inventory and stock, I need Inventory and Stock Project Descripti...

I need Inventory and Stock Project Description: I need a module of Stock & Inventory which will be integrated with our existing Accounts Module; Our existing module is prepar

Need help in zendesk integration, Twilio SMS Zendesk Integration This ...

Twilio SMS Zendesk Integration This must be a relatively quick job - Create a (PHP) script that creates / updates a new ticket in Zendesk when an SMS Text message is sent t

Need help in a spree specialist, Spreecommerce job (RoR) Want a Spree sp...

Spreecommerce job (RoR) Want a Spree specialist Objectives- 1) To integrate the custom theme (html mark-up need) 2) Slightly change the basic Spree functionality 3)

Design theory and style, 1. In the form of a table and sketches analyse the...

1. In the form of a table and sketches analyse the design solutions for 2 different buildings in terms of design theory and style, use, cost, build-ability and suitability, and bri

Design a web-site for the wider dissemination, (a) For electronic transacti...

(a) For electronic transactions (1) authentication and (2) non-repudiation are important legal concerns. Describe what each is and why each is of particular concern in electronic t

Image gallery with facebook like button, Hello! I have cheak all over goog...

Hello! I have cheak all over google for a answere how i can greate a facebook like button into my php-gallery. I have download the gallery from here: And">http://www.e2interact

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd