Quick References
      ADO
      ASP
      CSS2
      HTML
      JavaScript
      Jet SQL
      VBScript
      WML
      WMLScript
      WSH
      XHTML
      XML DOM
      XSLT

Features
      Knowledge Base
      Tutorials

Partners
     ZVON.ORG
     XML
     Planet Source Code
     VisualBuilder
     Web Design
     Your HTML Source
     XML/XSLT Forums
     ASPAlliance
     Scripts
     
     Programmers Heaven
     Tek-Tips Forums
     Developer Fusion
     Code Project











PROPERTY:  Document::domain


document.domain = "domaininfo"

This property sets or returns the domain name of the server from which the document originated. This defaults to the domain name of the server that the document was retreived from, but can be changed to a suffix (and only a suffix) of this name. This allows the sharing of script properties, security allowing, between documents delivered from different servers providing they share the same domain suffix.

The way you can alter the domain name property is very limited. For example, if a document was retreived from the URL 'search.devguru.com', you could change the domain property to 'devguru.com' but not 'search.devguru'.

These examples relate to a document retreived from the URL 'search.devguru.com'

Code:
document.domain = "devguru.com"     // This example is o.k.

document.domain = "search.devguru"     // This example is not allowed

document.domain = "devguru.net"     // This example is not allowed

 


Copyright 1999-2005 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information