window.getSelection()
...now this works with the frame that it's in..
i have a top frame and bottom frame.. i want to write the function in the bottom frame and the javascript runs on the top frame.. i tried this but it isn't working parent.topframe.location.getSelection