Hi,
This code (below) comes from an Open-source project (SemanticScuttle) I slightly modified the original code, attempting to convert a bookmarklet, into "web usable" Javascript.
Current Status: Google Chrome = Works perfectly!
Fiefox = Functional, but opens in a full sized tab, instead of the pre-defined size.
IE = DOA = Not functioning, please help...
<script type="text/javascript">
var selection = '';
if (window.getSelection) {
selection = 'window.getSelection()';
} else if (document.getSelection) {
selection = 'document.getSelection()';
} else if (document.selection) {
selection = 'document.selection.createRange().text';
}
document.write('<a href="javascript:x=document;a=encodeURIComponent(x.location.href);t=encodeURIComponent(x.title);d=encodeURIComponent('+selection+');open(\'http://example.com/share/bookmarks.php/Energy?action=add&amp;popup=1&amp;address=\'+a+\'&amp;title=\'+t+\'&amp;description=\'+d,\'Site Name\',\'modal=1,status=0,scrollbars=1,toolbar=0,resizable=1,width=885,height=765,left=\'+(screen.width-885)/2+\',top=\'+(screen.height-725)/2);void 0;"><img src="images/bar/book22_5.jpg" alt="Example Code" title="Example Code" /></a>');
</script>
Since it works in Chrome and functions in Firefox, I would really Love to be able to use it with iE also. Thank you very much.