AddFavorite by clicking an image

S

ScooterMX

I'm using the following to try to create an image that if clicked on, will
throw up the IE add bookmark, but it doesn't work. Can anyone suggest how
to do this?

<a><img src="images/default_static.gif" width="334" height="110" border="0"
onClick="window.external.AddFavorite('www.mostlymoose.com/index.html','Mostl
y Mooses')"></a>

Thanks in advance...
 
R

RobG

ScooterMX said:
I'm using the following to try to create an image that if clicked on, will
throw up the IE add bookmark, but it doesn't work. Can anyone suggest how
to do this?

<a><img src="images/default_static.gif" width="334" height="110" border="0"
onClick="window.external.AddFavorite('www.mostlymoose.com/index.html','Mostl
y Mooses')"></a>

You must fully specify the url: ...('http://www.mostlymoose..

This is an IE only function, so you should do some feature testing.
Have a look here:

<URL:http://www.codeave.com/javascript/code.asp?u_log=7063>

The script looks a bit dated, but it worked for me.

The author uses: <script language="JavaScript">

Which should be: <script type="text/javascript">

and also: <!-- and --> is totally not need. Otherwise, the scripts
seem OK.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,197
Messages
2,571,039
Members
47,634
Latest member
RonnyBoelk

Latest Threads

Top