User Guide
268
Note: This function is included for backward compatibility. It is recommended that you use the network ID returned
from a net lingo function rather than getLatestNetID. However, if you use getLatestNetID, use it immediately
after issuing the netLingo command.
Example
This script assigns the network ID of a getNetText operation to the field cast member Result so
results of that operation can be accessed later:
on startOperation
global gNetID
getNetText("url")
set gNetID = getLatestNetID()
end
on checkOperation
global gNetID
if netDone(gNetID) then
put netTextResult into member "Result"
end if
end
See also
netAbort, netDone(), netError()
getNetText()
Syntax
getNetText(URL {, serverOSString} {, characterSet})
getNetText(URL, propertyList {, serverOSString} {, characterSet})
Description
Function; starts the retrieval of text from a file usually on an HTTP or FTP server, or initiates a
CGI query.
The first syntax shown starts the text retrieval. You can submit HTTP CGI queries this way and
must properly encode them in the URL. The second syntax includes a property list and submits a
CGI query, providing the proper URL encoding.
Use the optional parameter
propertyList to take a property list for CGI queries. The property
list is URL encoded and the URL sent is
(urlstring & "?" & encodedproplist).
Use the optional parameter serverOSString to encode any return characters in propertylist.
The value defaults to
UNIX but may be set to Win or Mac and translates any carriage returns in the
propertylist argument into those used on the server. For most applications, this setting is
unnecessary because line breaks are usually not used in form responses.
The optional parameter
characterSet applies only if the user is running Director on a
shift-JIS (Japanese) system. Possible character set settings are JIS, EUC, ASCII, and AUTO.
Lingo converts the retrieved data from
shift-JIS to the named character set. Using the AUTO
setting, character set tries to determine what character set the retrieved text is in and translate it to
the character set on the local machine. The default setting is ASCII.
For a movie that plays back as an applet, the
getNetText command retrieves text only from the
domain that contains the applet. This behavior differs from Shockwave and is necessary due to
Java’s security model.
Use
netDone to find out when the getNetText operation is complete, and netError to find out
if the operation was successful. Use
netTextResult to return the text retrieved by getNetText.