View Full Version : Help With A Java Script
-=Cyrus=-
02-24-2004, 10:46 PM
:) I am wanting to control the font size of the following, what and where do i need to add the code as i have tried but nuthing has worked.
<script language=JavaScript>
var txt = "Add To Favorites";
var url = "mysite.com";
var who = "-sitename-";
var ver = navigator.appName;
var num = parseInt(navigator.appVersion);
if ((ver == "Microsoft Internet Explorer")&&(num >= 4)) {
document.write(''+ txt + ' (javascript:window.external.AddFavorite(url,who);)');
}else{
txt += " (Ctrl+D)";
document.write(txt);
}
</script>
Thanks
Put this in the <head> section...
<script type="text/javascript">
function bookmark()
{
if((navigator.userAgent.toLowerCase()).indexOf("msie")!=-1)
{
window.external.AddFavorite("http://www.yoursite.com","Your Site");
}
else
{
alert("This link will work only in Internet Explorer.");
}
}
function over()
{
window.status="The text you want to see in the status bar";
return true;
}
function out()
{
window.status=" ";
return true;
}
</script>
Then, use this as the link...
<a href="javascript:void(0);" onmouseover="over();" onmouseout="out();" onclick="bookmark();">Click here to bookmark this page.</a>
Hope this helps. :)
-=Cyrus=-
02-24-2004, 11:13 PM
Thanks :) I will go and try it now :)
Fuck, I just noticed an error. Went back and edited the original post.
-=Cyrus=-
02-25-2004, 05:44 PM
Thanks for your help :D the edited one works now :D
Thanks again,
-=Cyrus=-
Powered by vBulletin® Version 4.2.3 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.