d.e.o link bookmarklet (was Re: [Theforum] evoltspotting)

Madhu Menon webguru at vsnl.net
Wed Dec 5 13:42:23 CST 2001


At 12:53 AM 12/6/2001, Chris Spruck typed these words:
>I'll take a look as soon as I can.

Actually, I was talking about the pop-up tracker we discussed off-list. 
What I meant was that my JS really sucks and I've had to talk to you about 
doing the JS code for my article idea :)

>What about the way it works now don't you like or what would you want to 
>change? Not sure I'm following.

This bit:

<quote>

The bookmarklet can be modified by hand to include your name and email 
address. Just look through the javascript for the lines author=escape(''); 
and email=escape(''); and add your details between the quotes. 
Alternatively they can be saved using a cookie on the submission form.

</quote>

Why risk messing code up with contributors *manually* entering their name 
and email into the code:


<code>

javascript:if(document.selection){desc=escape(document.selection.createRange().text);}else 
if(document.getSelection){desc=escape(document.getSelection());}else{desc='';}title=escape(document.title);author=escape('');email=escape('');url=escape(document.location);urlstring='?url='+url+'&author='+author+'&email='+email+'&desc='+desc+'&title='+title;void(window.open('http://dir.evolt.org/suggest.php'+urlstring,'newwindow','width=600,height=400,scrollbars=yes'))

</code>

Instead, just ask for the person's name and email and then generate the 
code using a server-side script that produces, for example, this 
ready-to-go code fragment - no further editing required:


<code>

javascript:if(document.selection){desc=escape(document.selection.createRange().text);}else 
if(document.getSelection){desc=escape(document.getSelection());}else{desc='';}title=escape(document.title);author=escape('Chris 
Spruck');email=escape('cspruck at mindspring.com');url=escape(document.location);urlstring='?url='+url+'&author='+author+'&email='+email+'&desc='+desc+'&title='+title;void(window.open('http://dir.evolt.org/suggest.php'+urlstring,'newwindow','width=600,height=400,scrollbars=yes'))

</code>

(I've filled in your name and email above)


Was I too confusing?


>Chris "that's with a K" Spruck :-)

Typo. Honest. "H" & "K" are too close, and it's 01:04 here ;)
(and I really hate making spelling mistakes)

Madhu



<<<   *   >>>
Madhu Menon
User Experience Consultant
e-mail: webguru at vsnl.net





More information about the theforum mailing list