[Javascript] item.onclick = "alert('foo');";

Conyers, Dwayne, Mr [C] Dwayne.Conyers at nga.mil
Mon Nov 7 10:43:10 CST 2005

On Nov 6, 2005, at 6:01 PM, Anthony Ettinger wrote:

> this doesn't seem to work:
> var item = document.getElementById('foo'); item.onclick = 
> "alert('foo');";

I believe it should be "JavaScript:alert('foo');"

Assuming you want to popup a dialog with the word "foo" and an "ok" button.


More information about the Javascript mailing list