Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
HTML and CSS
DHTML Behaviors
Methods
 isHomePage Method

  Switch on low bandwidth view
isHomePage Method

Determines whether the specified URL refers to the client's home page.

Syntax

bQueryHome = homePage.isHomePage(sPageURL)

Parameters

sPageURL Required. A String that specifies the path or file name to compare against a client's specified home page.

Return Value

A 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 from 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>
This feature requires Microsoft Internet Explorer 5 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

Standards Information

There is no public standard that applies to this method.

Applies To

homePage

See Also

Introduction to DHTML Behaviors
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
isHomepage where firefox doesnt supported      lokoo ... Noelle Mallory - MSFT   |   Edit   |   Show History

the function which firefox doesnt support,any idea of the substitute

[Noelle Mallory - MSFT] Please post questions to the MSDN Forums at http://forums.microsoft.com/msdn. You will likely get a quicker response through the forum than through the Community Content.

Flag as ContentBug
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker