...

View Full Version : dissapearing "set as homepage" link!



VatsaL
11-12-2006, 05:21 PM
If you have Google or MSN search (http://www.live.com) as your homepage, you probab;y would have noticed, that if you click on the "make google your homepage" link once, and when you www.google.com again after setting it as your homepage, the link dissapears.

and if you set something else as your homepage, and then visit www.google.com, the link to set google as your homepage appears again.

How can I achieve that with javascript?? I tried playing with Google's code, but didnt actually work!

thanks,


VatsaL

ttttt
11-12-2006, 05:54 PM
You'll need to set a cookie telling you that it is set as homepage. Then a simple if statement will detect if the cookie is set or not. If it is then no link, if it isn't, then display the link.

VatsaL
11-12-2006, 06:41 PM
You'll need to set a cookie telling you that it is set as homepage. Then a simple if statement will detect if the cookie is set or not. If it is then no link, if it isn't, then display the link.

yeah, but woth cookies, there is a limitation - If the user's security level is high, or set not to accept any cookies, then the function wouldnt work! ..and if the user is one that frequently deletes cookies, then its worse!
thats why, I wanted to use javascript.

any idea how to, though?

felgall
11-12-2006, 07:18 PM
Well the only way Javascript can do it is by using cookies. If you prefer then you cvould do it using server side processing and cookies instead but without the cookie there is no way of telling what the home page is set to. Not also that if your visitor has plugged the security hole that allows Javascript to update the home page then the cookie will be set but the home page wont be changed.

ttttt
11-12-2006, 08:27 PM
If you used a server-side language, you might be able to do it using IP logging etc. but you'd have to use a database.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum