textrange and iframes

R

Rom

hi.
i need to select words cursor inside an iframe cause i have to do
something else after that. i read that this was obtained by using the
textrange capabilities. i was trying to select the word first but its
not working, this is the code im using so far.

function selectIt(){
var rjk;
rjk=idContent.document.body.createTextRange();
rjk.moveToPoint(window.event.x, window.event.y);
rjk.expand("word");
rjk.select();
}

idContent is the name of my iframe. Could someone tell me why it isnt
working and gimme some clues. I'd greatly appreciate it. thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top