isHomePage Method | Internet Development Index |
Determines whether the specified URL refers to the client's home page.
Syntax
bQueryHome = homePage.isHomePage(sPageURL)
Parameters
sPageURL Required. String that specifies the path and/or file name to compare against a client's specified home page.
Return Value
Boolean. Returns one of the following values:
true The client's home page is the same as the provided argument. false The client's home page is different than the provided argument.
Remarks
The isHomePage method returns false if the argument and a user's home page are the same, but the document calling the method is on a different domain than the user's home page.
Example
This example uses the isHomePage method to determine whether a user's home page is the same as the specified URL.
<HTML XMLNS:IE> <HEAD> <STYLE> @media all { IE\:HOMEPAGE {behavior:url(#default#homepage)} } </STYLE> <SCRIPT> function fnVerify(){ sQueryHome = oHomePage.isHomePage(oHomeHref.value); alert(sQueryHome); event.returnValue = false; } </SCRIPT> </HEAD> <BODY> <IE:HOMEPAGE ID="oHomePage" /> <INPUT TYPE=text ID=oHomeHref VALUE="http://www.microsoft.com"> <INPUT TYPE=button VALUE="Verify" onclick="fnVerify()"> </BODY> </HTML>
Standards Information
There is no public standard that applies to this method.
Applies To
homePage
See Also
Introduction to DHTML Behaviors