javascript programmer''''s reference phần 8 ppt

262 773 0
javascript programmer''''s reference phần 8 ppt

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

R - resizeTo() (Method) 1831 Delta X Delta Y See also: Window.onresize, Window.resizeBy() resizeTo() (Method) An alias for the window.resizeTo() method. Availability: JavaScript – 1.2 JScript – 3.0 Internet Explorer – 4.0 Netscape – 4.0 Property/method value type: undefined - myWindow.resizeTo(aSizeX, aSizeY) JavaScript syntax: - resizeTo(aSizeX, aSizeY) aSizeX A distance in pixels Argument list: aSizeY A distance in pixels JavaScript Programmer's Reference 1832 Height Width See also: Window.onresize, Window.resizeTo() response object (Object/NES) Part of the server-side support for JavaScript. This is the Global object in NES. Availability: JavaScript – 1.1 Netscape Enterprise Server – 2.0 JavaScript syntax: NES response Object properties: client, database, project, request, server Object methods: addClient(), addResponseHeader(), blob(), callC(), debug(), deleteResponseHeader(), flush(), getOptionValue(), getOptionValueCount(), redirect(), registerCFunction(), ssjs_generateClientID(), ssjs_getCGIVariable(), ssjs_getClientID(), trace(), write() The response object in NES is the global object as well. This means the methods and properties that belong to the global object also belong to the response. Because it is the global object there is no explicit way of referring to it. We have collated all the response object methods and properties together in a group to aid the rapid location of related topics. Additional index entries are provided for the properties and methods as they would be addressed as members of the global object. R - response.addClient() (Method) 1833 Warnings: ❑ The Response object is the Global object in a NES request-response context. See also: Netscape Enterprise Server, unwatch(), watch() Property JavaScript JScript NES Notes client 1.1 + - 2.0 + - database 1.1 + - 2.0 + - project 1.1 + - 2.0 + - request 1.1 + - 2.0 + - server 1.1 + - 2.0 + - Method JavaScript JScript NES Notes addClient() 1.1 + - 2.0 + - addResponseHeader() 1.2 + - 3.0 + - blob() 1.1 + - 2.0 + - callC() 1.1 + - 2.0 + - debug() 1.1 + - 2.0 + - deleteResponseHeader() 1.2 + - 3.0 + - flush() 1.1 + - 2.0 + - getOptionValue() 1.1 + - 2.0 + - getOptionValueCount() 1.1 + - 2.0 + - redirect() 1.1 + - 2.0 + - registerCFunction() 1.1 + - 2.0 + - ssjs_generateClientID() 1.2 + - 3.0 + - ssjs_getCGIVariable() 1.2 + - 3.0 + - ssjs_getClientID() 1.2 + - 3.0 + - trace() 1.1 + - 2.0 + - write() 1.2 + - 3.0 + - response.addClient() (Method) Information about the client is added to a URL. Availability: JavaScript – 1.1 Netscape Enterprise Server – 2.0 JavaScript syntax: NES addClient() JavaScript Programmer's Reference 1834 Use this method to maintain state across requests by hiding information about the client in the URL. This allows you to send a page to the client and when they submit a form you can associate that request with the previous one. See also: Netscape Enterprise Server response.addResponseHeader() (Method) Adds a header record to the response object. Availability: JavaScript – 1.2 Netscape Enterprise Server – 3.0 JavaScript syntax: NES addResponseHeader() The header to be added is presented as a name-value pair. See also: Netscape Enterprise Server response.blob() (Method) Extracts a binary large object from a data file in the server's file system. Availability: JavaScript – 1.1 Netscape Enterprise Server – 2.0 Property/method value type: blob object JavaScript syntax: NES blob() BLOBs can be pulled out of the database and presented as images or as links (that is, documents). See also: Netscape Enterprise Server response.callC() (Method) Calls a native function within the server. Availability: JavaScript – 1.1 Netscape Enterprise Server – 2.0 Property/method value type: String primitive JavaScript syntax: NES callC(aFunctionName, arguments, ) aFunctionName The name of a function that has been registered Argument list: arguments A set of arguments to be passed to it when called R - response.client (Property) 1835 External library functions can be registered with the Netscape Enterprise Server and can then be called from scripts running in the request-response loop. Such registered functions are invoked with the callC() method. The function name is the one that was used when it was registered. Registering a function creates a wrapper that will always return a string primitive value. See also: Netscape Enterprise Server response.client (Property) A reference to a client object when scripts are used in NES. Availability: JavaScript – 1.1 Netscape Enterprise Server – 2.0 Property/method value type: client object JavaScript syntax: NES client This global property points at a client object that is created automatically. The transactions between the Netscape Enterprise Server and the client browser maintain sufficient session state information that this object can be made available between one page request and the next. See also: client object, Netscape Enterprise Server, request object response.database (Property) A property that points at a globally available database access object. Availability: JavaScript – 1.1 Netscape Enterprise Server – 2.0 Property/method value type: database object JavaScript syntax: NES database The object referred to by this property can be used to create connections to whatever database you have available in the server back-end environment. See also: database object JavaScript Programmer's Reference 1836 response.debug() (Method) Prints a debugging message or value in the trace window. Availability: JavaScript – 1.1 Netscape Enterprise Server – 2.0 JavaScript syntax: NES debug() This is a server-side method to assist in debugging script execution when developing scripts for NES. This provides a means of watching the progress of a request-response handler which is running in a context that has no terminal I/O capabilities. See also: Netscape Enterprise Server response.deleteResponseHeader() (Method) Removes a specified header record from the response. Availability: JavaScript – 1.2 Netscape Enterprise Server – 3.0 JavaScript syntax: NES deleteResponseHeader(aHeader) Argument list: aHeader The name of the header to be removed This is part of the management of the request-response loop in the server. Many response headers will be added automatically by the NES server, and you may want to add others. Occasionally, the server may place a header into the response that you don't want to send back to the user. This method can be used to remove such a header. See also: Netscape Enterprise Server response.flush() (Method) Sends the current contents of the output buffer to the client. Availability: JavaScript – 1.1 Netscape Enterprise Server – 2.0 JavaScript syntax: NES flush() R - response.getOptionValue() (Method) 1837 Response writing tends to involve a certain amount of buffering by the response manager in the server back-end. This is necessary to improve performance and throughput. The data is only physically transferred to the client when a buffer full of data is ready or when the response is completed. This can mean that a JavaScript error can leave the response incomplete if it fails in a way that prevents the response from being completed properly. A run-time error would normally not write any pending response data out to a client or it might result in part of the data being sent but probably not all. The flush() method allows you to force the response output to the client to be updated so that the response is complete up to this point and there are no pending contents yet to be transmitted. You might force a flush() at the end of a database record being read and processed for example. See also: File.flush(), Netscape Enterprise Server response.getOptionValue() (Method) Returns the value of the selected option items in a <SELECT> block. Availability: JavaScript – 1.1 Netscape Enterprise Server – 2.0 Property/method value type: String primitive JavaScript syntax: NES getOptionValue() Server-side access to the <OPTION> tag contents in a <SELECT> block is accomplished slightly differently in an NES server than in a Netscape Navigator browser. This is because the viewpoint is different as you look at the DOM. The DOM standard relates predominantly to how the document is modelled in the client. See also: Netscape Enterprise Server, Option object, Select object response.getOptionValueCount() (Method) Returns the number of items in a <SELECT> block. Availability: JavaScript – 1.1 Netscape Enterprise Server – 2.0 Property/method value type: Number primitive JavaScript syntax: NES getOptionValueCount() This would normally be the length property of a collection or array. See also: Netscape Enterprise Server, Option object, Select object JavaScript Programmer's Reference 1838 response.project (Property) A reference to a project object when scripts are executed in NES. Availability: JavaScript – 1.1 Netscape Enterprise Server – 2.0 Property/method value type: project object JavaScript syntax: NES project This global property points at a project object that is created when the server application is starts running. The project object is created automatically and a reference to it is stored here for use when needed. See also: Netscape Enterprise Server, project object response.redirect() (Method) Send the appropriate headers and meta information to cause the client to do a redirect to a different URL. Availability: JavaScript – 1.1 Netscape Enterprise Server – 2.0 JavaScript syntax: NES redirect(URL) This is a convenience method for populating headers in the response. See also: Netscape Enterprise Server response.registerCFunction() (Method) Register a native C language function for use with callC(). Availability: JavaScript – 1.1 Netscape Enterprise Server – 2.0 Property/method value type: Boolean primitive JavaScript syntax: NES registerCFunction(aFunctionName, aLibrary, aCFunction) aCFunction The name of the C function in the library aFunctionName The name of the function in the JavaScript environment Argument list: aLibrary A path to the library containing the C function R - response.request (Property) 1839 External library functions can be registered with the Netscape Enterprise Server and can then be called from scripts running in the request-response loop. Such registered functions are invoked with the callC() method. The registration process creates a mapping between the JavaScript environment and the C language environment. This suggests that the two need not be named the same although it is good practice to preserve the names recognizably across such wrapping mechanisms. The C function is encapsulated in a JavaScript object wrapper. A Boolean true value is returned if the registration succeeds and a Boolean false if it fails. See also: Netscape Enterprise Server response.request (Property) A reference to a request object that encapsulates a client request arriving in an NES server. Availability: JavaScript – 1.1 Netscape Enterprise Server – 2.0 Property/method value type: request object JavaScript syntax: NES request This global property points at a request object that is created when the client submits a request to the server. The request object is created automatically and a reference to it is stored here for use when needed. See also: Netscape Enterprise Server, request object response.server (Property) A reference to the server object is created automatically when the server is started. Availability: JavaScript – 1.1 Netscape Enterprise Server – 2.0 Property/method value type: server object JavaScript syntax: NES server This property refers to the globally available server-wide shared server object. There is only one of these and it is available to all sessions, application projects and client requests. This is an object that allows you to share property values across all sessions running in all applications across the entire server. The locking facilities permit you to lock resources while you are using them. JavaScript Programmer's Reference 1840 Because this applies server-wide, there is even more reason to ensure you lock objects for the minimum of time and relinquish the locks as soon as possible. It is quite feasible to completely stall the whole server by locking a vital resource during the processing of a single client request. The effect of this is to make your server a single-threaded non-concurrent session server. That is, it will only actually serve one client request at a time. See also: Netscape Enterprise Server, server object response.ssjs_generateClientID() (Method) Generate a unique identifier for a new client object. Availability: JavaScript – 1.2 Netscape Enterprise Server – 3.0 Property/method value type: String primitive JavaScript syntax: NES ssjs_generateClientID() There may be times during session-state management that you need a unique ID value for the clients. This method provides a means of generating a guaranteed unique ID value. See also: Netscape Enterprise Server response.ssjs_getCGIVariable() (Method) Return the value of the requested environment variable. Availability: JavaScript – 1.2 Netscape Enterprise Server – 3.0 Property/method value type: String primitive JavaScript syntax: NES ssjs_getCGIVariable() The server-side execution occurs within an environment that may have been inherited from the hosting operating system. Other environment values will have been provided by the web server. See also: Netscape Enterprise Server [...]... (>>) 184 7 JavaScript Programmer's Reference routeEvent() (Function) Part of the Netscape Navigator 4 event propagation complex Availability: JavaScript – 1.2 Netscape – 4.0 Property/method value type: undefined JavaScript syntax: N myWindow.routeEvent(anEvent) N routeEvent(anEvent) anEvent An event object Argument list: Object 1 Object 2 Object 3 Object 4 See also: Cross-references: Wrox Instant JavaScript. .. (aName)[anIndex] myRT = myDocument.getElementsByTagName ("RT")[anIndex] anIndex A reference to an element in a collection aName Argument list: An associative array reference anElementID Collections: The ID value of an Element object all[], attributes[], childNodes[], children[], filters[] 184 9 JavaScript Programmer's Reference See also: RUBY object, style.rubyAlign, style.rubyOverhang, style.rubyPosition,... dynamically as needed rule.selectorText (Property) The selector text for a rule Availability: DOM level – 2 JavaScript – 1.5 JScript – 3.0 Internet Explorer – 4.0 Netscape – 6.0 Property/method value type: String primitive JavaScript syntax: - myRule.selectorText 185 3 JavaScript Programmer's Reference This is the part of the CSS style definition text that associates the rule with a document element... screen Availability: JavaScript – 1.2 Netscape – 4.0 Property/method value type: Number primitive JavaScript syntax: N myScreen.availLeft 186 3 Chapter number Property attributes: ReadOnly Refer to: Screen.availHeight Screen.availTop (Property) The top-most pixel that is accessible in this screen Availability: JavaScript – 1.2 Netscape – 4.0 Property/method value type: Number primitive JavaScript syntax:... Enterprise Server – 3.0 Property/method value type: ResultSet object JavaScript syntax: NES ResultSet.prototype NES myResultSet.constructor.prototype Refer to: prototype property 184 4 R - return (Statement) return (Statement) Returns control back to the caller of a function Availability: JavaScript syntax: ECMAScript edition – 2 JavaScript – 1.0 JScript – 1.0 Internet Explorer – 3.02 Netscape – 2.0... Cross-references: ECMA 262 edition 2 – section – 12.9 ECMA 262 edition 3 – section – 12.9 Wrox Instant JavaScript – page – 27 returnValue (Property) An alias for the window.returnValue property Availability: JScript – 3.0 Internet Explorer – 4.0 Property/method value type: User defined JavaScript syntax: IE myWindow.returnValue IE myWindow.returnValue = aNewValue IE returnValue Argument list: 184 6 returnValue... the outgoing HTML response stream Availability: JavaScript – 1.2 Netscape Enterprise Server – 3.0 JavaScript syntax: NES write() This is a server-side method that is not to be confused with the method that belongs to the document object The write() method can be used to output values generated by any legal JavaScript It is the only way that server-side JavaScript can generate any output and it should... UniversalBrowserRead, UniversalBrowserWrite, UniversalFileRead, UniversalPreferencesRead, UniversalPreferencesWrite, UniversalSendMail ResultSet object (Object/NES) This is part of the database access suite in Netscape Enterprise Server It is returned by a stored procedure call Availability: JavaScript – 1.2 Netscape Enterprise Server – 3.0 JavaScript syntax: nes Object properties: prototype Object methods:... PAGE_RULE 2 DOM level 2 specifies these additional properties: ❑ type ❑ parentRule See also: Document.styleSheets[], SelectorArray object, StyleSheet object, StyleSheet.rules[] 185 1 JavaScript Programmer's Reference Property JavaScript JScript N IE Opera DOM Notes cssText 1.5 + 5.0 + 6.0 + 5.0 + - 2+ - parentStyleSheet 1.5 + 5.0 + 6.0 + 5.0 + - 2+ - readOnly - 3.0 + - 3.0 + - - ReadOnly runtimeStyle... Professional JavaScript database.connect("ODBC", "myDatabase", "me", "myPassword", ""); myStoredProc = database.storedProc("myProcedure", 40); myResultSet = myStoredProc.resultSet(); See also: 184 2 database.storedProc(), Netscape Enterprise Server, Stproc.resultSet(), unwatch(), watch() R - ResultSet.close() (Method) Property JavaScript JScript NES Notes prototype 1.2 + - 3.0 + - Method JavaScript . object, Select object JavaScript Programmer's Reference 183 8 response.project (Property) A reference to a project object when scripts are executed in NES. Availability: JavaScript – 1.1 Netscape. is added to a URL. Availability: JavaScript – 1.1 Netscape Enterprise Server – 2.0 JavaScript syntax: NES addClient() JavaScript Programmer's Reference 183 4 Use this method to maintain state. to: Bitwise shift right (>>) JavaScript Programmer's Reference 184 8 routeEvent() (Function) Part of the Netscape Navigator 4 event propagation complex. Availability: JavaScript – 1.2 Netscape

Ngày đăng: 12/08/2014, 19:21

Mục lục

    response object (Object/NES)

    ResultSet object (Object/NES)

    Right shift (Operator/bitwise)

    RT object (Object/HTML)

    RUBY object (Object/HTML)

    rule object (Object/DOM)

    runtimeStyle object (Object/JScript)

    S object (Object/HTML)

    Same origin (Security related)

    SAMP object (Object/HTML)

Tài liệu cùng người dùng

Tài liệu liên quan