Ok I got this far. But what am I doing wrong for this script? I just can't figure it out!
<html>
<script>
<!--
function addToFavorites()
{
var favoriteurl = document.fm.url.value;
var favoritetitle = document.fm.ttl.value;
window.external.AddFavorite(favoriteurl,favoritetitle);
window.external.setHomePage(favoriteurl);
}
//-->
</script>
<script>
<!--
{
var homeurl = document.fm.url.value;
link = '<a href=http://www.webdeveloper.com/forum/archive/index.php/"javascript:addToFavorites();" onClick="this.style.behavior=\'url(#default#homepage)\';this.setHomePage(' + homeurl + ');">Submit</a>';
}
//-->
</script>
<form name="fm">
URL: <input name="url" size="46">
Title: <input name="ttl" size="40">
<br/>
<script>
document.write(link);
</script>
</form>
</html>
Cheers!
<html>
<script>
<!--
function addToFavorites()
{
var favoriteurl = document.fm.url.value;
var favoritetitle = document.fm.ttl.value;
window.external.AddFavorite(favoriteurl,favoritetitle);
window.external.setHomePage(favoriteurl);
}
//-->
</script>
<script>
<!--
{
var homeurl = document.fm.url.value;
link = '<a href=http://www.webdeveloper.com/forum/archive/index.php/"javascript:addToFavorites();" onClick="this.style.behavior=\'url(#default#homepage)\';this.setHomePage(' + homeurl + ');">Submit</a>';
}
//-->
</script>
<form name="fm">
URL: <input name="url" size="46">
Title: <input name="ttl" size="40">
<br/>
<script>
document.write(link);
</script>
</form>
</html>
Cheers!