What's wrong with this bookmarklet?

K

kj

I'm working with Firefox 2.0.0.1/OS X. I've defined the following
bookmarklet:

javascript:location='http://tinyurl.com/create.php?url='+escape(location); void 0

and assign it the keyword tu. When I invoke the keyword in the
location bar, it gets replaced by the bookmarklet, as printed above
but nothing else happens; the browser stays on the current page
(instead of visiting the URL stored in location). If I then manually
put the focus on the location bar (which now contains the code for
the bookmarklet) and hit return, then the desired url (tinyurl.com)
is visited (the tinyurl that gets generated is wrong, but I think
that this may be due to the double-escaping that results from the
redundant submission).

To make matters even more puzzling, I have one other very similar
bookmark:

location = 'http://web.archive.org/web/*dc_/'+escape(location); void 0

....that works just fine: when I invoke the associated keywords,
the desired page appears. I've stared at these two bookmarklets
forever, but I don't understand why the second one causes a new
page to be visited while the other one remains inert.

What am I doing wrong? Any ideas?

TIA!

kj
 

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

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,241
Members
46,831
Latest member
RusselWill

Latest Threads

Top