Skip to Content
WebObjects® Developer's Guide
book

WebObjects® Developer's Guide

by Ravi Mendis
June 2002
Intermediate to advanced content levelIntermediate to advanced
400 pages
7h 48m
English
Sams
Content preview from WebObjects® Developer's Guide

Introduction to JavaScript and WebObjects

First, let's revisit the Hello application created in Chapter 1, “A Web Objects Primer.” We are going to return the greeting in the form of a JavaScript pop-up window instead of a second page.

Dynamically Vended JavaScript Alert Panel

Duplicate the Hello project and rename it DynamicHello by following the instructions in Chapter 1.

Open Main.wo in WebObjects Builder. We are going to use an onLoad script to perform the JavaScript alert.

Add the following key to the Main page:

Name: onLoad

Type: String (java.lang.String)

As Variable: NO

Accessors: Only the Method returning the value

Now bind the onLoad key to the WOBody element. Because onLoad isn't a defined binding for WOBody (that is, you wouldn't see it ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Real World XML

Real World XML

Steven Holzner
What Successful Project Managers Do

What Successful Project Managers Do

W. Scott Cameron, Jeffrey S. Russell, Edward J. Hoffman, Alexander Laufer

Publisher Resources

ISBN: 0672323265Purchase book