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

Need help in social network website, Social Network Website The social w...

Social Network Website The social website should have profile creation, upload profile photo, inbox messaging, support uploads for video, photo, audio and text files post and br

Distributed course registration system, Webservice Implementation of the Di...

Webservice Implementation of the Distributed Course Registration System In this assignment, you are going to implement the Distributed Course Registration System (DCRS) from Assig

Write a php application, Write a Php application that is used to manage a r...

Write a Php application that is used to manage a restaurant business. Assume menu items, categories (appetizer, dessert ...etc), prices and descriptions. The Restaurant has 10 tabl

Crucial wordpress edit, Crucial wordpress edit I need this job to be don...

Crucial wordpress edit I need this job to be done asap Budget is around $40-$60 Make the pixel perfect for this site as well as create collection page Desired Skills are A

What do you understand by the term open source, (a) Briefly outline the co...

(a) Briefly outline the concept of the Three-tier architecture. (b) What do you understand by the term Open Source? How does Open Source Software differ from Proprietary Sof

How the web server interprets php, How the web server interprets PHP and in...

How the web server interprets PHP and interacts with the client? After installing and configuring PHP, web When PHP is installed, Web server looks for PHP code which is embedde

Explain features of php, Question: (a) (i) Name four features of PHP t...

Question: (a) (i) Name four features of PHP that makes it an appropriate choice as a Web programming language. (ii) List advantages while using PHP scripting language.

We need a magento wysiwyg editor on cmspro extension, We need a Magento WYS...

We need a Magento WYSIWYG Editor on CMSPro Extension I consume the CMSPro extension from MageWorld.com. Content parts use a WYSIWYG editor. But I want to change the WYSIWYG edit

Web developer with cms applications, Web Developer a) Intermediate to ad...

Web Developer a) Intermediate to advanced skill level with WordPress (Essential) and some experience working with leading CMS applications. b) Strong knowledge of Classic ASP

The front end developer drupal 7 with an mssql backend, The front end devel...

The front end developer Drupal 7 with an MSSQL backend to finish prototype We are a social technology start up led by two pioneers in the social technology business in Los Angel

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