Forum Moderators: mack

Message Too Old, No Replies

javascript bookmarks not working

         

Skateboardsales

12:05 am on Oct 2, 2002 (gmt 0)

10+ Year Member



i am relatively new to web design, and super new to javascript (i only cut and paste scripts so far).... anyways, i am trying to cut/paste a script to auto-bookmark my page.

i have used many different scripts, none of them work for me. the only thing i can think of is that they might be getting messed up because the site i am building is a site that uses frames.

if this is the problem, does anyone know of a workaround for it?

if it matters, i am trying to put the bookmark link in the contents frame (left side) and have a header frame, footer frame, and main page frame in addition to the contents frame.

if you need more clarification to help me, let me know, and i will get you any info you need.

-Thanks in advance,
Skate

korkus2000

1:09 am on Oct 2, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld [webmasterworld.com] Skateboardsales,

Are you using something like:

<a href="javascript:window.external.AddFavorite('http://www.mysite.com','Favorites text')">Bookmark Us</a>

Skateboardsales

1:58 am on Oct 2, 2002 (gmt 0)

10+ Year Member



i have been using java scripts like these:

script1:

<!-- TWO STEPS TO INSTALL BOOKMARK PAGE:

1. Copy the coding into the HEAD of your HTML document
2. Add the last code into the BODY of your HTML document -->

<!-- STEP ONE: Paste this code into the HEAD of your HTML document -->

<HEAD>

<SCRIPT LANGUAGE="JavaScript">

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source! [javascript.internet.com...] -->
<!-- Original: Prakash -->
<!-- Web Site: [www20.brinkster.com...] -->
<!-- Begin
function addbookmark()
{
bookmarkurl="http://wwwJavascriptsource.com"
bookmarktitle="Welcome To The Java Script Source"
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}
// End -->
</script>

</HEAD>

<!-- STEP TWO: Copy this code into the BODY of your HTML document -->

<BODY>

<a href="javascript:addbookmark()"><b>Bookmark This Page</a>

<p><center>
<font face="arial, helvetica" size"-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
</center><p>

<!-- Script Size: 1.02 KB -->

script2:

<!-- ONE STEP TO INSTALL BOOKMARK US:

1. Copy the coding into the BODY of your HTML document -->

<!-- STEP ONE: Paste this code into the BODY of your HTML document -->

<SCRIPT LANGUAGE="JavaScript">

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source! [javascript.internet.com...] -->

<!-- Begin
if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {

var url="http://www.javascriptsource.com";
var title="The JavaScript Source";

document.write('<A HREF="javascript:window.ext');
document.write('ernal.AddFavorite(url,title);" ');
document.write('onMouseOver=" window.status=');
document.write("'Add our site to your favorites!'; return true ");
document.write('"onMouseOut=" window.status=');
document.write("' '; return true ");
document.write('">Add our site to your favorites!</a>');
}
else {
var msg = "Don't forget to bookmark us!";
if(navigator.appName == "Netscape") msg += " (CTRL-D)";
document.write(msg);
}

// End -->
</script>

<p><center>
<font face="arial, helvetica" size="-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
</center><p>

<!-- Script Size: 0.91 KB -->

those are indicative of the types i have used... some with only script for the body, some with script for both. i usually wind up getting the error "'url' undefined" when i try to click the links they make... the other error i get alot is "object expected"

-thanks again,
Skate

korkus2000

12:06 pm on Oct 2, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Have you tried the script I posted? I know that a lot of people around here have massive bookmark scripts that detect browsers and all sorts of stuff. Maybe someone else has one that is more robust.

Skateboardsales

3:23 pm on Oct 2, 2002 (gmt 0)

10+ Year Member



yes, i tried it, but i think i did something way wrong when i did.....

it posted the whole thing on the page, not a link.

do i need to put in the tag

<SCRIPT LANGUAGE="JavaScript">

anywhere? if so, where?

korkus2000

3:25 pm on Oct 2, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



No you just place it in the body where you want it to go. What browser are you using?

it posted the whole thing on the page, not a link.

Please explain. Where did you put the link in the body or the head?

Skateboardsales

6:33 pm on Oct 2, 2002 (gmt 0)

10+ Year Member



i am using IE6sp1 browser.

frontpage 2002 editor

i put it in the body of my contents page.

if you want to see the site, send me a sticky mail, and i'll reply with the site address, so you can see exactly what i'm working with, and where i want the link to go.

Skateboardsales

8:09 pm on Oct 2, 2002 (gmt 0)

10+ Year Member



ok, i figured it out!

i was copying the one you gave me from the website directly to frontpage.... when i copied it to my text editor first, it worked.

but i still haven't figured out how to make the other ones work.... i'll try this with them too....

MsDetta

1:25 pm on Oct 3, 2002 (gmt 0)

10+ Year Member



When you use FrontPage, you need to take anything you copy into the Wordpad or Notepad. Then recopy it to FrontPage otherwise FrontPage will totally corrupt your copied text. Hope this solves your problems.