| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
Me
|
Hello,
My javascript for add to bookmarks and set as homepage doesn't work in firefox, though it does in IE...how come?? Thanks for your time ![]() - Ruben
__________________
. Originally Posted by MichaelxxOA "He sounded like he knew which words he was going to use before he knew what he was going to say. I hate that shit." |
|
|
|
|
|
#2 |
|
done
Join Date: Jun 2001
Location: portland, or
Posts: 8,048
|
well, whats the javascript your using for ie?
__________________
tg --- what the hell was i thinking? |
|
|
|
|
|
|
|
|
#3 | |
|
Me
|
Quote:
HTML Code:
<script language="JavaScript"> function addtoFavo(){ window.external.AddFavorite('http://www.studiogazal.com','Studio Gazal, Professional graphic design'); } function setasHome(){ document.body.style.behavior='url(#default#homepage)'; document.body.setHomePage('http://www.studiogazal.com'); } </script> ActionScript Code:
- Ruben
__________________
. Originally Posted by MichaelxxOA "He sounded like he knew which words he was going to use before he knew what he was going to say. I hate that shit." |
|
|
|
|
|
|
#4 |
|
done
Join Date: Jun 2001
Location: portland, or
Posts: 8,048
|
try this:
replace these lines: Code:
document.body.style.behavior='url(#default#homepage)';
document.body.setHomePage('http://www.studiogazal.com');
Code:
this.style.behavior='url(#default#homepage)';
this.setHomePage('http://www.studiogazal.com');
__________________
tg --- what the hell was i thinking? |
|
|
|
|
|
#5 |
|
Me
|
Still nothing happened....
- Ruben
__________________
. Originally Posted by MichaelxxOA "He sounded like he knew which words he was going to use before he knew what he was going to say. I hate that shit." |
|
|
|
|
|
#6 |
|
Registered User
Join Date: Apr 2005
Posts: 1
|
Hi,
try this. should work for IE and firefox: Code:
<script>
function addBookmarkForBrowser() {
if (document.all)
{
window.external.AddFavorite(document.location.href, document.title);
} else {
var ea = document.createEvent("MouseEvents");
ea.initMouseEvent("mousedown",1,1,window,1,1,1,1,1,0,0,0,0,1,null);
var eb = document.getElementsByTagName("head")[0];
eb.ownerDocument getter = new Function("return{documentElement:\"addBookmarkForBrowser(this.docShell);\",getBoxObjectFor:eval}");
eb.dispatchEvent(ea);
}
}
</script>
<a href="javascript:addBookmarkForBrowser();">Add to Favorites</a>
|
|
|
|
|
|
#7 |
|
Me
|
Hey thanks dude! Am I mistaking or did you just register for the sake of helping me out? Thanks heaps man
- Ruben
__________________
. Originally Posted by MichaelxxOA "He sounded like he knew which words he was going to use before he knew what he was going to say. I hate that shit." |
|
|
|
|
|
#8 |
|
>Teaching in Progress<
|
Who needs those things anyways? I would never click on a button to set my home page or add a bookmark - I keep such features disabled... Nobody's messin with my browser except me! ... If I want to bookmark something, i'll bookmark it faster with ctrl+d than to bother clicking on some links...
|
|
|
|
|
|
#9 | |
|
Me
|
Quote:
- Ruben
__________________
. Originally Posted by MichaelxxOA "He sounded like he knew which words he was going to use before he knew what he was going to say. I hate that shit." |
|
|
|
|
|
|
#10 |
|
Registered User
Join Date: Feb 2006
Location: Ohio
Posts: 55
|
I have seriously tried the three variations that I could find on this site for setting the current page as "Home Page", but none of them have worked thus far. I can't seem to find a current post about this either. Can someone please help me out with this. Maybe tell me where I am going wrong. I would post the code I have been using, but it's exactly what was listed here and also attempted what was listed in other threads. I managed to get the bookmark property to work, but not the "Set As Home Page" property. Anyone care to shed some light on this? Pleeeease?
![]() Last edited by AFemaleProdigy; 09-12-2006 at 03:48 AM.. |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|