Archive for July, 2007

Error! No text of specified style in document. (Web hosting service)

Friday, July 27th, 2007

Error! No text of specified style in document. setInterval() (Method) A method for setting timer intervals. Availability: JavaScript 1.2 JScript 3.0 Internet Explorer 4.0 Netscape 4.0 Property/method value type: Number primitive -myWindow.setInterval(aFunction, anInterval, someArguments) -myWindow.setInterval(aSourceText, anInterval) -setInterval(aFunction, anInterval, someArguments) JavaScript syntax: -setInterval(aSourceText, anInterval) aFunction A function object (not supported in MSIE) anInterval A time interval in milliseconds aSourceText Some valid JavaScript source text Argument list: someArguments The arguments to the function object (not supported in MSIE) See also: Timer events, Window.clearInterval(), Window.setTimeout(), Window.setInterval() setResizable() (Method) Enable or inhibit the window resize capability. Availability: JavaScript 1.2 Netscape 4.0 Property/method value type: undefined N myWindow.setResizable(aSwitch)JavaScript syntax: N setResizable(aSwitch) Argument list: aSwitch A Boolean value to control the functionality Refer to: Window.setResizable() 1923

Web design rates - Chapter number Server-side JavaScript (Definition) That JavaScript which

Thursday, July 26th, 2007

Chapter number Server-side JavaScript (Definition) That JavaScript which is executed in the web server, probably in response to a browser request and accessed via CGI. Server-side JavaScript is when the JavaScript source is executed in response to a request from a user’s client application. That request arrives as a server, which then determines that a JavaScript needs to be executed to build the response. The server then runs the script and returns the output of it to the user, most likely in the form of a web page but possibly in the form of some image data or other textual or binary content. Some server-side implementations are designed to yield performance improvements by semi- compiling the JavaScript and retaining that byte-code form in a cache. Each server may offer alternative ways to invoke the server-side scripting. It is hoped that all the servers that use JavaScript and which conform to ECMAScript may well use the same tags for enclosing the server-side script. However, since the tags are not defined in the standard, this may be a vain hope. Active Server Pages, CGI Driven JavaScript, Desktop JavaScript, Internet Information Server, LiveWire, Netscape Enterprise Server, Shell Scripting with JavaScript See also: Cross-references: Wrox Instant JavaScript page 3 Wrox Instant JavaScript page 5 Wrox Instant JavaScript page 64 Wrox Professional JavaScript page 59-90 setHotkeys() (Method) Activate or deactivate keyboard shortcuts for this window. JavaScript 1.2 Availability: Netscape 4.0 Property/method value type: JavaScript syntax: undefined myWindow.setHotKeys(aSwitch) N N setHotKeys(aSwitch) Argument list: A Boolean switch value aSwitch Refer to: Window.setHotkeys() 1922

Error! No text of specified style in (Free web hosts) document.

Thursday, July 26th, 2007

Error! No text of specified style in document. server.unlock() (Method) Relinquisesh a lock on the server object. Availability: JavaScript 1.1 Netscape Enterprise Server version 2.0 JavaScript syntax: NES server.unlock() If you ever lock the server object from a script, you should call this as soon as you possibly can after you have completed your lock critical code. Retaining a lock on your server object is not only bad manners but is seriously bad for the health and well-being of your server. Locking server objects persistently will hog resources and your server performance will slow to a crawl. See also: project.unlock() Server side browser detection (Useful tip) You can do a great deal of browser portability handling if you are prepared to serve browser specific pages from your web server. A wholly dynamic site may be able to serve browser, platform and version specific HTML according to the value of the userAgent string that the browser sends when it makes a request. This technique is fine for a few pages and when they don’t experience high traffic. To serve static pages this way needs a smarter server-side trick to be deployed. You could render very browser specific copies of your pages and store them under document path names that contain a component that could be derived by disassembling the userAgent string. Then in your web server, you can trap every request that needs this capability, route it through a special module and generate a browser-specific path modification. If you do this creatively, you could provide a mechanism that allows the web pages to request an unmodified URL but the web server serves a page that is as close to ideal as it can get. For example, the browser might be Netscape 3 on a Macintosh. That might yield a string containing a 3 for the version, an N for the browser and an M for the platform. The 3 might become a 4 or even a 6for other versions of Netscape Navigator. The N might become an E for MSIE, an I for iCab or an O for Opera. The M might become a W for windows. So we have a string that represents the browser, platform and version in three letters. We might get a string such as NM3, for example. When the browser requests a page called index.html, the web server would inspect the userAgent string and work out that its normalized signature is NM3. The web server can then attempt to serve the page NM3index.html. If this does not exist, the web server can fall back to NMindex.html and then Nindex.html before eventually serving just plain old index.html. These tests in the web server will take fractions of a second with something like a stat()function call to test for the existence of a file. With this technique, your publishing logic can generate some very platform, browser and version specific static files and the web server can locate them quickly and efficiently even when there are high traffic loads on the server farm. It s also workable for style sheets and can be deployed in a load- balanced multi-machine server farm as well. See also: Compatibility 1921

Chapter number It is vitally important that you (Web site management)

Wednesday, July 25th, 2007

Chapter number It is vitally important that you don’t hog a lock on the server object as this can deny server access to all other users The lock will stall if another script currently has a lock extant on this project. The method will then return when that lock is relinquished. Warnings: . Locking the server object can lead to severe performance degradation. While it is locked, any lock requests made by other scripts will stall pending the lock being relinquished with an unlock() method call. . You can render your server virtually useless by over-locking the server object. You should aim to relinquish any locks as soon as you possibly can. Ideally you should seek to avoid locking the server object if at all possible. See also: project.lock() server.port (Property) The port number that the server listens on for incoming requests. JavaScript 1.1 Number primitive Availability: Netscape Enterprise Server version 2.0 Property/method value type: JavaScript syntax: NES server.port This value is normally port number 80, but ports 81, 8080 or 8081 are also commonly used. It can be any port number you like although there are many reserved ports for other services on the host. On a Unix system, there is an /etc/servicesfile that will enumerate the ports that are likely to be reserved for other non web-server purposes. You may also have difficulty in using ports below number 1024 unless you have access to the system administrator account. server.protocol (Property) The protocol supported by the server is available from this property. JavaScript 1.1 String primitive Availability: Netscape Enterprise Server version 2.0 Property/method value type: JavaScript syntax: NES server.protocol Typical values for this property will be “http:” or “https:”. The latter will be used if the server is a secure server providing e-commerce support for example. 1920

Web site management - Error! No text of specified style in document.

Wednesday, July 25th, 2007

Error! No text of specified style in document. server.host (Property) The machine and domain name values for the server host. Availability: JavaScript 1.1 Netscape Enterprise Server version 2.0 Property/method value type: String primitive JavaScript syntax: NES server.host This value will be the DNS name that you can use to reach the server. You might use this value to manufacture URL values for use in HREF=”…” HTML tag attributes for example. See also: Netscape Enterprise Server, unwatch(), watch() server.hostname (Property) The hostname and port property of the receiving server object. JavaScript 1.1 String primitive server.hostname Availability: Netscape Enterprise Server version 2.0 Property/method value type: JavaScript syntax: This value will be the same as the host property if the port number the server listens on is 80. Otherwise, the port number will be appended to the host value and that will be the hostname value. A colon separator is introduced between the host and port values. NES See also: Netscape Enterprise Server server.lock() (Method) A means of locking the server object to prevent contention between scripts. Availability: JavaScript 1.1 Netscape Enterprise Server version 2.0 JavaScript syntax: NES server.lock() The server lock would be used at a higher hierarchical level than the project lock mechanism. 1919

Chapter number Property JavaScript JScript NES Notes agent

Tuesday, July 24th, 2007

Chapter number Property JavaScript JScript NES Notes agent 1.1 + 2.0 + - host 1.1 + 2.0 + - hostname 1.1 + 2.0 + - port 1.1 + 2.0 + - protocol 1.1 + 2.0 + - Method JavaScript JScript NES Notes lock() 1.1 + 2.0 + Warning unlock() 1.1 + 2.0 + - Cross-references: Wrox Instant JavaScript page 65 Wrox Instant JavaScript page 67 server.agent (Property) Describes the server being used. Availability: JavaScript 1.1 Netscape Enterprise Server version 2.0 Property/method value type: String primitive JavaScript syntax: NES server.agent The userAgent property of the navigator object in a web browser describes the kind of browser being used. This value is presented as a text string. This is the corresponding property in a web server and provides a way to deploy scripts that are shared amongst several variants of a server that are compatible but different. Navigator.userAgent See also: 1918

Error! No text of specified style in document. (Web hosting contract)

Tuesday, July 24th, 2007

Error! No text of specified style in document. SendMail.To (Property) Defines the To: address for the e-mail. Availability: JavaScript 1.2 Netscape Enterprise Server version 3.0 Property/method value type: String primitive JavaScript syntax: NES mySendMail.To This property contains the value that is transmitted in the To: header of the outgoing e-mail. The value assigned to this property should be a comma separated list of To: recipient e-mail addresses. These are the recipients of the e-mail and if you specify several, it may be more efficient as your SMTP server can bulk deliver several messages at once. server object (Object/NES) An object that represents the server in server-side JavaScript implementations. JavaScript 1.1 Availability: Netscape Enterprise Server version 2.0 JavaScript syntax: server NES Object properties: agent, host, hostname, port, protocol Object methods: lock(), unlock() This is a server-side host object representing the server. There is only one and you cannot instantiate it although you can make references to it. All users on the web server share this object. This is an object that allows you to share 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. 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, project object, response.server, unwatch(), watch() 1917

Chapter number SendMail.send() (Method) Sends the message encapsulated (Web host server)

Monday, July 23rd, 2007

Chapter number SendMail.send() (Method) Sends the message encapsulated by this object. Availability: JavaScript 1.2 Netscape Enterprise Server version 3.0 JavaScript syntax: NES mySendMail.send() This connects to the sendmailprocess in the server and dispatches the message. There is an implication here that because it uses sendmail, then the server can only run on platforms that support sendmail. That further implies the platform is a Unix system, although sendmail is open source and may be deployed on non-Unix platforms. If sendmail is not available the results of calling this method are uncertain. SendMail.Smtpserver (Property) Defines the name of the SMTP server to which we shall connect and request that our message be sent. Availability: JavaScript 1.2 Netscape Enterprise Server version 3.0 Property/method value type: String primitive JavaScript syntax: NES mySendMail.Smptpserver You will need to consult your system administrator about this value. It is impossible to state with any certainty what value you should assign to this property there are so many possible ways to configure a mail server and deploy it. It may or may not be on the same machine as your web server. SendMail.Subject (Property) Defines the subject heading for the message. Availability: JavaScript 1.2 Netscape Enterprise Server version 3.0 Property/method value type: String primitive JavaScript syntax: NES mySendMail.Subject This property contains the value that is transmitted in the Subject: header of the outgoing e-mail. The value assigned to this property should be a 7 bit ASCII string. 1916

Error! No (Web hosting domain names) text of specified style in document.

Monday, July 23rd, 2007

Error! No text of specified style in document. SendMail.Organization (Property) A standard header to describe the organisation you belong to. Availability: JavaScript 1.2 Netscape Enterprise Server version 3.0 Property/method value type: String primitive JavaScript syntax: NES mySendMail.Organization This property contains the value that is transmitted in the Organization: header of the outgoing e-mail. The value assigned to this property can be any 7 bit ASCII string. SendMail.prototype (Property) The prototype for the SendMail object that can be used to extend the interface for all SendMail objects. JavaScript 1.2 SendMail object Availability: Netscape Enterprise Server version 3.0 Property/method value type: NES SendMail.prototype JavaScript syntax: NES mySendMail.constructor.prototype Refer to: prototype property SendMail.ReplyTo (Property) The address to which replies should be sent. JavaScript 1.2 String primitive mySendMail.ReplyTo NES Availability: Netscape Enterprise Server version 3.0 Property/method value type: JavaScript syntax: This property contains the value that is transmitted in the ReplyTo: header of the outgoing e-mail. The value assigned to this property should be a comma separated list of ReplyTo: recipient e-mail addresses. Beware that many mail clients do not honor this field, they will attempt to send messages back to the ErrorsTo: or From: addresses or may even make one up. These header values are merely conventions and although they are described in various RFC documents, mail clients are written by people whose skills and attention to detail range from the plain careless to the highly professional. 1915

Unlimited web hosting - Chapter number SendMail.errorMessage() (Method) If there is an

Monday, July 23rd, 2007

Chapter number SendMail.errorMessage() (Method) If there is an error, then you can obtain the message text with this method. Availability: JavaScript 1.2 Netscape Enterprise Server version 3.0 Property/method value type: String primitive JavaScript syntax: NES mySendMail.errorMessage() Use this method after calling the send() method to retrieve any pending error message text. SendMail.ErrorsTo (Property) Defines the recipient of error e-mails if the message fails to arrive. JavaScript 1.2 String primitive mySendMail.ErrorsTo NES Availability: Netscape Enterprise Server version 3.0 Property/method value type: JavaScript syntax: This property contains the value that is transmitted in the ErrorsTo: header of the outgoing e-mail. The value assigned to this property should be a valid email address (or comma separated addresses). If the receiving mail system experiences any problems during the onwards delivery to the recipient’s mailbox (for example, if it doesn’t exist or is full), then a message is reflected back to the e-mail address in the ErrorsTo: header. SendMail.From (Property) Defines the From address of the e-mail. Availability: JavaScript 1.2 Netscape Enterprise Server version 3.0 Property/method value type: String primitive JavaScript syntax: NES mySendMail.From This property contains the value that is transmitted in the From: header of the outgoing e-mail. The value assigned to this property should be a valid e-mail address. It is considered to be bad practice to forge From addresses in mail headers, and some mail systems will not allow you to do this and will override the settings you define for this value. Whatever value ends up in the From: header, the recipient can reply to this address if they mean to. It makes sense for this to be a mail address that a human being will ultimately check although you may want to put in some automation to read incoming e-mails if you expect a lot of responses. 1914