Layer.onFocus

JavaScript 1.2+ Nav4+ Syntax

onFocus="command"

Description

The onFocus property is an event handler for the Layer object that notifies you when the focus is set on a layer object.

Example

Listing 7.341 shows how the onFocus method is used to detect when focus is set on Layer 1.

Listing 7.341 Example of the onFocus Event Handler
<html>
<head>
<title> Using the onFocus event handler of the Layer object</title>
</head>
<body>

<script language="JavaScript">
<!-- Hide
function showMsg(){
    document.form1.text1.value = "Focus set on Layer 1";
}
// End Hide --->
</script>

<layer id="layer1" width=200 height=200 color= bgcolor="yellow" TOP=170
LEFT=200 VISIBILITY="show"onFocus='showMsg()'>
<center>Layer 1</center>
</layer>
							 <layer ...

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.