[thelist] hypothetically speaking ...

Aleem Bawany aleem.bawany at utoronto.ca
Thu Nov 21 18:56:01 CST 2002


> On Thursday, Nov 21, 2002, at 13:35 US/Central, Peter VanDijck wrote:
> > Say you have multiple bookmarklets...it calls the server...you are
> > still looking at page X...Is this practically possible? (using PHP
on
> > the server)
>
> Yes.

so would that mean I can simply highlight some content on a random
website, click a bookmarklet and have that fed into my content
management system, which would automatically publish it online... all
with the click of a button?


> Maybe you could use this functionality, though? Put your scripts on a
> page in a small palette-style popped-up window (instead of using
> bookmarklets), so that they are available at all times. Give their
> links/buttons accesskey attributes. The user would have to bring focus
> to your special window [by clicking on it] before hitting the
keystroke.
>
> Not exactly "tap-a-magic-button" elegant, but it would work.
>
> Any better ideas out there?

Since accesskey gives focus to an element, you can embed the javascript
onFocus event to execute your javascript, allowing you to have keyboard
driven events:

<a accesskey="1" href="#" onFocus="JavaScript: doSomething()">Use Alt+1
to Do Something</a>

(it just occurred to me... you might as well consider onKeyPress events)

I was playing around with it earlier, you can view it here:

http://one.com.pk/test/accesskey.html

-aleem



http://www.aleembawany.com




More information about the thelist mailing list