Reputation: 328
I have written a bookmarklet that functions just fine in Chrome and Firefox but it IE 10 it fails to append to the document. I believe it has something to do with it being listed as "unrated" in the IE favorites bar, but I am not sure what part of the code is triggering that:
<a href="javascript:(function() {
var elem=document.createElement('script');
elem.setAttribute('type','text/javascript');
elem.setAttribute('src', 'http://www.joshdforbes.com/web2mobile/
web2mobile.js?t='+(new Date().getTime()));
document.body.appendChild(elem);
})()">Web2Mobile</a>
Having a hard time finding any information on the internet about what the differences are in IE10 that would be causing this. Any help would be appreciated.
Thanks!
Upvotes: 0
Views: 314
Reputation: 19367
It worked for me but I'm on IE8. Did you compress it first?
javascript:(function(){var elem=document.createElement('script');elem.setAttribute('type','text/javascript');elem.setAttribute('src','http://www.joshdforbes.com/web2mobile/web2mobile.js?t='+(new Date().getTime()));document.body.appendChild(elem);})()
I did get the warning message initially, but I ignored it and it worked.
Upvotes: 1