setHomePage Method

MS Office DHTML, HTML & CSS

setHomePage Method


Sets a user's home page to the specified value.

Syntax

oHomePage.setHomePage(sPageURL)

Parameters

sPageURL Required. String that specifies the path and/or file name of the user's home page.

Return Value

No return value.

Remarks

The setHomePage method prompts the user to confirm the new home page value before setting it on the browser.

Example

This example uses the setHomePage method to set a user's home page.

Sample Code

<HTML XMLNS:IE>
<HEAD>
<STYLE>
@media all {
   IE\:HOMEPAGE {behavior:url(#default#homepage)}
}
</STYLE>

<SCRIPT>
function fnSet(){
	oHomePage.setHomePage(oHomeHref.value);
	event.returnValue = false;
}
</SCRIPT>
</HEAD>
<BODY>
<IE:HOMEPAGE ID="oHomePage" />
<INPUT TYPE=text ID=oHomeHref VALUE="http://www.microsoft.com">
<INPUT TYPE=button VALUE="Set" onclick="fnSet()">
</BODY>
</HTML>
This feature requires Internet Explorer 5 or later. Click the icon below to install the latest version. Then reload this page to view the sample.
Microsoft Internet Explorer

Applies To

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
Version data is listed when the mouse hovers over a link, or the link has focus.
homePage

See Also

dhtml behaviorsInternet Link

Back to topBack to top

Did you find this topic useful? Suggestions for other topics? write us!Internet Link

© 1999 microsoft corporation. all rights reserved. terms of useInternet Link.