Currently I'm trying to make a plugin for my browser (Maxthon/IE6)
which allows me to select any text on the current page and press the
plugin button to create a new tab with the selection.
This will do the job:
<script language="JavaS cript">
javascript:r4NS y3m=document.se lection.createR ange();oDgs2Ke= r4NSy3m.text;dT 30FfN=new
Date();wdGs8c6= window.open('', 'w'+dT30FfN.get Time(),'');wdGs 8c6.document.wr ite(oDgs2Ke);
void(wdGs8c6.do cument.close())
</script>
Unfortunately, I want to retain the layout of the text and the above
code strips it out.
The code on http://www.webreference.com/js/colum...ssbrowser.html
seems to do precisely what I want but it displays the current selection
in a box on the page. I'm not interested in using 'onmouseup' as I want
to decide when the page should open.
Can someone please show me how to make the webreference example work in
a new page on demand.