/    Sign up×
Community /Pin to ProfileBookmark

how to add a certain page to the browser home page

Hello

I have 2 pages in the application.
In page A.html, the user configures some settings.
When the user is done, he clicks on a button titled ‘Next’ and is taken to page B.html where a success message is displayed.

One of the configuration settings in page A.html is a checkbox which allows the user to decide whether he wants to set a specific site as his browser home page.

I want to prompt the user with the home page confirmation box when page B.html is loaded (if the user selected this configuration setting)

Can anyone show me how this can be done?
Is it only possible in IE? What about other browsers?

thanks in advance

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@sciguyryanNov 24.2004 — Its possible in IE by using something lke the following:

<i>
</i>&lt;a href="#" OnClick="this.style.behavior='url(#default#homepage)'; this.setHomePage('Your URL here');"&gt;Make us your homepage!&lt;/a&gt;


Convert that to JS and your done!



RyanJ
Copy linkTweet thisAlerts:
@jasongrauthorNov 24.2004 — thanks

here is my solution in JavaScript (utilizing a hidden anchor):
<i>
</i>&lt;head&gt;
&lt;script language="JavaScript" type="text/javascript"&gt;
&lt;!--
function pageLoaded() {
var hiddenLink = document.getElementById('dummy');
hiddenLink.style.behavior='url(#default#homepage)';
hiddenLink.setHomePage('http://www.webdeveloper.com');
}


--&gt;
&lt;/script&gt;
&lt;/head&gt;
&lt;body onload="pageLoaded();"&gt;
&lt;a href="#" id="dummy" style="display:none"&gt;&lt;/a&gt;
&lt;/body&gt;


I hope other developers will find it useful
×

Success!

Help @jasongr spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...