Re: Help with bookmarklet - problem solved

From: Riesner, Giles <GRIESNER_at_nyob>
Date: Fri, 21 Jan 2005 14:34:04 -0500
To: CODE4LIB_at_listserv.nd.edu
I posted my query to  comp.lang.javascript  and was given the answer:

     You want
     var Qr = document.getSelection(); var Qa = prompt('Author...', Qr);
     at least for Netscape 4 and later, and for Opera 7.

I re-wrote my bookmarklet ever so slightly so that it now reads:

      <a href="javascript:var Qr=document.getSelection();
       var Qa=prompt('Author...',Qr);
       var Qt=prompt('Title...',Qr);if(Qa&&Qt)
       location.href='http://library.ccbcmd.edu/search~S4/q?
       author='+escape(Qa)+'&title='+escape(Qt)">
       Combined Author and Title... FFX</a>

I tried it and it worked perfectly.

Giles W. Riesner Jr., Library Tech Support
Community College of Balto. Co. - Catonsville
800 S. Rolling Rd., Baltimore MD 21228  USA
Tel/V-Mail 1-410-455-4245
Email:       griesner_at_ccbcmd.edu
Received on Fri Jan 21 2005 - 14:37:07 EST