getAllFields()

 

This function returns an array of all fields on the screen.

Example:

The example below searches for fields that appear to contain an email address; then underlines them and makes them clickable.

var fields = getAllFields(); for (var i = 0; i < fields.length; i++) { var field = fields[i]; var value = get(field.id); if (value.indexOf("@") != -1 && value.indexOf(".") != -1) { field.style.textDecoration = "underline"; field.onclick = function(e) { pui.link("mailto:" + get(getTarget(e))); } } }

Â