View Full Version : Bookmarklet in div depending on browser brand.

06-19-2009, 10:13 AM
Hi, I'm pretty new posting in this forum, however I did look on it for years :)

For this problem I tried a few things like a document.write action or getElementbyId etc, does anyone have ideas?

This is my problem.

I want to have a image as bookmarklet.

In IE, you have to right click on the image and "save as" favorite or "save as" favorite bar item.

In FF, you can drag the image to your bookmark bar, that's why people need to see the right image on every browser. When this works I will try to find a sollution for Opera too.

These pictures need to have the following link, When you hit the bookmarklet on the favoritesbar, the URL of a page will be copy/paste to my site.

This is a example from a other page, the pictures also.

javascript:document.write('<html><head><title>{$txt_short_url}</title></head><body><form name=\'urlform\' action=\'{$page_url}\' method=\'post\'><input type=\'hidden\' name=\'u\' value=\'' + window.location.href + '\' /><input type=\'hidden\' name=\'title\' value=\''+encodeURIComponent(document.title)+'\' /><input type=\'hidden\' name=\'twitter\' value=\'1\' /></form></body></html>');document.forms[0].submit();" title="{$txt_bookmark_me}" class="s6l_bookmarklet"><img src="../default/image/slepen.png" width="171" height="44" border="0" />

This must be placed in a div for positioning. I hope someone can help me with this.