Convenient Way For Windows XP Internet Explorers To Add My Javascript Bookmarklet?
Aug 14, 2005
In pre-Windows XP Internet Explorer, adding a bookmarklet for a user was
really simple. All I add to do was create a link that executed
addFavorite().
Internet Explorer under Windows XP won't allow that due to its new security
measures.
How can I make adding a bookmarklet convenient for my Windows XP IE users
without having them to do surgery on their security preferences?
Right now I'm having them Ctrl-D to add a new bookmark. Right-click the new
bookmark to get the Properties dialog, and then pasting in the contents of
my bookmarklet. This is quite messy as you can imagine. In addition, when
they save the bookmarklet, they have to hit "Yes" to an error box telling
them that "javascript:" does not have a registered program associated with
it, do they want to save the bookmark anyways?
I have bookmarklets with a # in their urls but safari changes the # to %23. And unfortunately, the bookmarklet does not work with %23. You need to change it back manually to #.
I'm using the following javascript bookmarklet for creating del.icio.us posts, and it works fine, but i've been trying to augment it with "document.getSelection" and have not gotten it to work.
the code is: javascript:q=location.href;p=document.title;void(open('http://del.icio.us/fogboy?v=3&jump=close&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title),'delicious%20',%20'toolbar=no,width=740,height=700'))
and it works fine (to test of course you'd have to change the del.icio.us username in there), except it doesn't have the "document.getSelection" syntax which would make it so highlighted text on a page was put in the "notes" field. i've tried about 5 different ways of writing that, based on other versions i've seen around. i would love to know exactly the right syntax to use to get this working.
I am trying to play a video from javascript using the WMP plugin in IE.It works fine in Firefox and Chrome, but not IE.[code]This doesn't play the video in IE8.It works if I use the SRC parameter when I embed the player, but I need the video to change when I click on buttons.
I'm playing with the great Bassistance jQuery Validator and am stuck at a point The idea is simple: I have lot of this markup (I semplify, but the idea is that after each <input> there could be something else, i.e. a word, an icon, etc... that is "inline" with the corresponding<input>):
Certain links (using IE) that are meant to open a javascript window don't seem to work on my system. That is, the window appears and disappears in a flash. Of course I have disabled my pop-up stopper. Any suggestions?
As most Javascript coders probably know by now, IE on Windows XP SP2 likes to prevent our code from running right away (the user is asked to give permission the first time). Although I can see the danger in allowing all scripts to run, the fact that IE makes it sound like we are going to install some huge, horrible application when we are simply adding rollovers or client-side validation or some other simple little thing really frustrates me. Specifically what stuff does IE block? Does it check for certain methods in the script? Does it block everything until you say it's OK? What can places do to allow their scripts to be run without the need to be validated by the user? I have heard about "Signed Scripts", but I feel that it would be hard to modify and develop when a script had to be "Signed" every time. Any comments?
i'm using IE 6.0.2800 and in the last month no matter which site on the net each link to a javascript window opens up and crash a sec after its not the pop-up blocker i checked this out already.
How do I deactivate a window using Javascript. For example if I have a window that opens up another window, how do I prevent the user from clicking (doing anything) in the original window until the new window has been closed.
I'm working on controlling Windows Media Player with JavaScript. I have all my functions working but a few. I want to sync the movie so that when it finishes the movie it loads the new one.
Now I was thinking of doing something like:
function PlayNext(movie) { if( Player.controls.currentPosition == Player.controls.duration ) { // execute code to load next movie } } I have that function being called every half second and I still can't get it to sync.
I have a page with two frames, 'header' and 'main'. The following code works in Netscape, but in Internet Explorer. The second bgColor line produces an error:
function test(){ top.frames.header.document.bgColor='white' //works fine top.frames.main.document.bgColor='white' //fails }
I am trying to complete a javascript application and am having problems with code similar to that show below.
Much testing has shown that Firefox finishes the code shown in around 0.25 secs but Internet Explorer 6 takes a massive 3.5 secs! Internet Explorer 7 gets it down to around 2 seconds - but that's still 8 times slower than Firefox and way unacceptable for my userbase.
Looking through the newsgroups there is some discussion around the differences between the way the two browsers handle arrays - but a performance differential such as this is just unbelievably dismal.
Unfortunately I need to continue to use arrays of objects and have to support the Internet Explorer client base. I have already added specification of the array size and also removed the use of array "push"ing - flattening the array is not really an option. Code:
So this works just fine in FF. In IE7 I am getting this error. I can see my content load in the background, when I hit ok it takes me to a page cannot be displayed page. If I comment out:
I have a bookmarklet which copies a marked set of characters into a searchpage in our dictionary. If nothing is copied, a window opens where you can type a word.
BTW, it is for firefox 2.0.
javascript:s=window.getSelection();if(s=='')for(i= 0;i<frames.length;i++){s=frames[i].document.getSelection();if(s)break;}if(!s)void(s= prompt('some text.',''));if(s){test=open('URL/search.pl?searchphrase='+escape(s));test.focus();} This works well.
We have another search /command which needs to be finished with &search= after the searchphrase
searchphrase="here comes the markedtyped set of characters"&search=
Can anyone of you help me changing the bookmarklet or point me to a site where I can read more about this?
below is clickunder code , but it open under windows when visitor click everywhere on the pagei need it be speacial for links , whenever visitor click on speacial link , it opens windows
<SCRIPT LANGUAGE="Javascript"> function PopShow3() { CookieTest=navigator.cookieEnabled; if(CookieTest)
I've found examples of bookmarklets that select a URL from a page at random, but I'd like one that generates part of the URL at random.
If you have a bunch of images that are named: mydomain.com/images/abcd.jpg where abcd is can be any combination of 4 lowercase letters - is there a way of having the bookmarklet generate the letters randomly when clicked?
I'm able to do it using AppleScript & Safari but would like it to work from within Safari - which is missing the "Scripts" menu that most Apple apps have :(
It looks as if bookmarklets are the only option, but I've only ever used javascript to select randomly from existing arrays of images and don't fancy typing in the names of a couple of thousand images...
Download the attached file, rename it read.html and open it. Drag the "read" link onto your Favorites|Links toolbar, and acknowlege the warning dialog. Then, from anyone's page, click the "read" bookmarklet and read along with it.
My basic premise is that vowels and digits make for a place to pause momentarily (90ms) during reading. If it reads too fast or slow, you can adust the delay factor accordingly.
This pops up a new window with every call. In the child window I call a parent function onbeforeunload, appClose() :
function appClose(){
if (window.opener && !window.opener.closed){ window.opener.CloseChild(getQueryString("application")); }}
This is in my frameset tag of the child code :
<frameset ... onbeforeUnload='appClose()'>
The window.opener.CloseChild() function is called perfectly when I have one child window open, but as soon as I create another child window both of the open child windows don't ever call it. They do both go into the onbeforeunload appClose() function, but do not call the window.opener.CloseChild() function inside of this routine.
Anyone have any ideas why when I have two child windows open I can't access the window.opener functions?
I have tried taking each new window out of the array and used the following code in CloseChild() :
When publishing bookmarklets, we put the bookmarklet code in anchor tag like this:
<a href="javascript: alert('test');"name </a>
Some characters of the code need to be escaped. For example, double quotes need to be escaped as %22 like in this example: <a href="javascript: var doubleQuote = '%22' alert(doubleQuote);"> name </a>
Question: Is double quotes the only thing that need to be escaped?
I have seen examples of escaping spaces as %20, but it seems unnecessary in most browsers i have used.