Adobe COLDFUSION 9 Manual page 1096

Developing applications
Hide thumbs Also See for COLDFUSION 9:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Using Web Elements and External Objects
personInfo.lastName[nRows] = lastName;
// Clear input fields
document.personForm.firstName.value = "";
document.personForm.lastName.value = "";
// Show added names on list
// This gets a little tricky because of browser differences
var newName = firstName + " " + lastName;
if (navigator.appVersion.indexOf("MSIE") == -1) {
document.personForm.names[length] =
new Option(newName, "", false, false);
}
else {
// IE version
var entry = document.createElement("OPTION");
entry.text = newName;
document.personForm.names.add(entry);
}
}
</script>
<!--- Data collection form --->
<form action="#cgi.script_name#" method="Post" name="personForm">
<!--- Input fields --->
Personal information<br>
First name: <input type=text name=firstName><br>
Last name: <input type=text name=lastName><br>
<br>
<!--- Navigation & submission bar --->
<input type="button" value="Next" onclick="doNext()">
<input type="button" value="Serialize"
onclick="serializeData(personInfo, document.personForm.wddxPacket)">
<input type="submit" value="Submit">
<br><br>
Names added so far:<br>
<select name="names" size="5">
</select>
<br>
<!--- The WDDX packet is stored here.--->
<!--- In a real application this text area would be a hidden
input field. --->
<br>
WDDX packet display:<br>
<textarea name="wddxPacket" rows="10" cols="80" wrap="Virtual">
</textarea>
</form>
<!--- Server-side processing --->
<hr>
Last updated 8/5/2010
1091

Advertisement

Table of Contents
loading

Table of Contents