Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > Supporting Technologies > HTML and JavaScript

Reply
 
Thread Tools Rate Thread Display Modes
Old 08-13-2004, 11:29 AM   #1
Ruben
Me
 
Ruben's Avatar
 
Join Date: Jul 2002
Location: Netherlands, Europe
Posts: 3,510
Send a message via MSN to Ruben Send a message via Skype™ to Ruben
Default FIREFOX: Set as homepage & add to bookmarks

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."
Ruben is offline   Reply With Quote
Old 08-13-2004, 03:47 PM   #2
tg
done
 
Join Date: Jun 2001
Location: portland, or
Posts: 8,048
Default

well, whats the javascript your using for ie?
__________________
tg
---
what the hell was i thinking?
tg is offline   Reply With Quote
Old 08-13-2004, 03:54 PM   #3
Ruben
Me
 
Ruben's Avatar
 
Join Date: Jul 2002
Location: Netherlands, Europe
Posts: 3,510
Send a message via MSN to Ruben Send a message via Skype™ to Ruben
Default

Quote:
Originally Posted by tg
well, whats the javascript your using for ie?
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>
And of course the following in my swf:
ActionScript Code:
getURL("javascript:addtoFavo();"); getURL("javascript:setasHome();");

- 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."
Ruben is offline   Reply With Quote
Old 08-13-2004, 04:06 PM   #4
tg
done
 
Join Date: Jun 2001
Location: portland, or
Posts: 8,048
Default

try this:
replace these lines:

Code:
		document.body.style.behavior='url(#default#homepage)';
		document.body.setHomePage('http://www.studiogazal.com');
with:
Code:
		this.style.behavior='url(#default#homepage)';
		this.setHomePage('http://www.studiogazal.com');
and see what happens.
__________________
tg
---
what the hell was i thinking?
tg is offline   Reply With Quote
Old 08-13-2004, 04:13 PM   #5
Ruben
Me
 
Ruben's Avatar
 
Join Date: Jul 2002
Location: Netherlands, Europe
Posts: 3,510
Send a message via MSN to Ruben Send a message via Skype™ to Ruben
Default

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."
Ruben is offline   Reply With Quote
Old 04-14-2005, 04:32 AM   #6
oliver69
Registered User
 
Join Date: Apr 2005
Posts: 1
Default

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>
Hope it helps.
oliver69 is offline   Reply With Quote
Old 04-17-2005, 01:00 PM   #7
Ruben
Me
 
Ruben's Avatar
 
Join Date: Jul 2002
Location: Netherlands, Europe
Posts: 3,510
Send a message via MSN to Ruben Send a message via Skype™ to Ruben
Default

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."
Ruben is offline   Reply With Quote
Old 04-17-2005, 09:23 PM   #8
[Sx]
&gt;Teaching in Progress&lt;
 
[Sx]'s Avatar
 
Join Date: Mar 2005
Location: Serbia
Posts: 666
Send a message via ICQ to [Sx] Send a message via MSN to [Sx] Send a message via Yahoo to [Sx]
Default

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...
__________________
_______________
http://www.TopFlashers.com
[Sx] is offline   Reply With Quote
Old 04-18-2005, 09:54 AM   #9
Ruben
Me
 
Ruben's Avatar
 
Join Date: Jul 2002
Location: Netherlands, Europe
Posts: 3,510
Send a message via MSN to Ruben Send a message via Skype™ to Ruben
Default

Quote:
Originally Posted by [Sx]
Who needs those things anyways? I would never click on a button to set my home page or add a bookmark
Neither would I, CTRL+D for president. But hey, remember to always think about the ways of your target-audience first; stupid Lizzy from down the street who bumped into the site incidentally might click the bookmark-link. In 4 years maybe she'll need some proper webdesign for the hairdresser's saloon she started...

- 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."
Ruben is offline   Reply With Quote
Old 09-12-2006, 03:23 AM   #10
AFemaleProdigy
Registered User
 
AFemaleProdigy's Avatar
 
Join Date: Feb 2006
Location: Ohio
Posts: 55
Question Help me make some sense of this...

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..
AFemaleProdigy is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:27 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2009 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.