If you use jQuery it's even simpler:
jQuery.getScript(http://foo.com/js/markCurrent.js?marklet=1234http://foo.com/js/markCurrent.js?marklet=1234%27%29;document.getElementsByTagName%28%27head%27%29%5B0%5D.appendChild%28e%29%7D%29%28
)
On Wed, Mar 4, 2009 at 2:21 AM, Lee Mighdoll
That would be nice, and would work on the page containing the link, but not
for a bookmarklet. With bookmarklets, the user drags the link to the
browser bookmark menu or bookmark bar. Then the bookmarklet runs in the
context of whatever page they're currently looking at.
Lee
On Wed, Mar 4,
thx - I'll keep an eye out for that. I think IE had a max url length of 2K
or so, but I'll watch our for maximum attribute lengths as well.
The basic idea is to use the bookmarklet to load and insert a larger script
-- so hopefully it can stay small.
Lee
On Wed, Mar 4, 2009 at 10:37 AM, David
On Wed, Mar 4, 2009 at 11:09 AM, Lee Mighdoll leemighd...@gmail.com wrote:
thx - I'll keep an eye out for that. I think IE had a max url length of 2K
or so, but I'll watch our for maximum attribute lengths as well.
The basic idea is to use the bookmarklet to load and insert a larger script
That's basically what the link above does -- hard to read in compressed
form. :-).
The server sends an arbitrarily script that's inserted and executed in the
document that the user is currently viewing. The inserted script does the
real work.
The marklet parameter is issued per user, for
Ah, sorry to be so cryptic. The idea is to create a link containing a
'javascript:' url that the user can then drag to the browser's bookmark
bar. I had something like this:
a
href=javascript:(function(){var%20e=document.createElement('script');e.type='text/javascript';e.setAttribute('src','
Lee,
If you want to include a JavaScript script on the page, the easiest
mechanism is:
import net.liftweb.http._
import js._
import JsCmds._
import JE._
Script(JsRaw(a String containing the raw script))
This will create a script tag on the page and put a // ![CDATA[ in it
followed by your