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

We need developer for modifying a website, We are looking for a very skille...

We are looking for a very skilled php developer to help us make modifications to our website. Job Description- We are looking for a Web Developer. Your responsibilities- 1

Need help in website design for music portal, Website Design for Music Port...

Website Design for Music Portal I need to launch music portal in India. I am asking anybody to make the attractive design for my portal. If I like the design I will provide t

Develop a javascript code to generate a pull down menu box, 1. Develop...

1. Develop a program to display a multiplication table. 2. Develop a code to generate a scrolling text in a text box. 3. Develop a JavaScript code to generate

Need magneto development for changes to a custom module, Magneto Developmen...

Magneto Development - Changes to a custom module We are consist an Instagram image upload module built for our Magneto based website. The developer of this module is no longe

We need help in custom hook for a wordpress plugin, We need help in Custom ...

We need help in Custom Hook for a Wordpress plugin We are in search of someone that can create a custom hook from one plugin into another. The logic is that while a user clic

Need help in internet marketing software project needed, Need help in Inter...

Need help in Internet marketing software project needed I want a internet marketing software, bot, app created asap I have over 60 software that I have researched I want some

Migrate and format content from old wp theme to new theme, Need help in mig...

Need help in migrate and format content from old WP theme to new (different) WP theme Seeking for a WP expert to migrate my old site's content from its current existing theme, t

We are developing a social network as well as marketplace, Individual Devel...

Individual Developer for charity-focused social network We are developing a social network as well as marketplace for charities and need a programmer proficient in php, mysql, c

I want help in website internal development, I want help in Website interna...

I want help in Website internal development, angular, grunt, javascript, html,css ninja JavaScript, css(scss), html, angularJS. Familiar with grunt build process understand t

I am seeking a long term wordpress developer, WordPress Developer - Long Te...

WordPress Developer - Long Term I am seeking a long term WordPress developer. We will start with a test project. You have to develop a WordPress theme from scratch. Note-

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