Hello everyone.
I just began working on my first extension, but have run into a problem that I can't seem to fix.
What I want to do is to get a web page text selection into a JavaScript variable.
I found a small little script that does such thing, but for me it only works as a link within the same page. What I need it to do is to copy the selected text when the appropriate button on the toolstrip is clicked. Unfortunately, when I click the button, the selection isn't being copied into my script.
I'm not too sure how the toolstrip is implemented, and have tried various workarounds with none of them working. What I can see is that the moment I click the button, the tab I was in is unfocused (the selected text turns from blue to gray). My theory is that the selection command is not copying it correctly because that tab is no longer the active tab. I have tried using scripts within my toolstrip page, but I am unable to successfully communicate with the other tabs. I have also tried running my selection function onmouseover the button, but that doesn't work either.
How can I approach this?


LinkBack URL
About LinkBacks



Reply With Quote
