
1091
DEVELOPING
COLDFUSION 9 APPLICATIONS
Using Web Elements and External Objects
Las
t
upda
te
d 8/5/2010
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 = fir " " + 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>
Содержание COLDFUSION 9
Страница 1: ...Developing Applications ADOBE COLDFUSION 9...