View Single Post
  #5 (permalink)  
Old Oct 17th, 2004, 12:22
Monie Monie is offline
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,608
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
This is my code to make the highlited text to be a url link..
Just put this on the <head> tag...
and call them using an gif or a text.

Code: Select all
function hiliteToExternLink(txtArea){
    txtAreaName   = txtArea.name;
    txtRange      = document.all[txtArea].createTextRange();
    txtContainer  = txtRange.parentElement().name;
    
    objRange      = document.selection.createRange();
    hiliteTxt     = objRange.text;

    toExternLink   = '' + hiliteTxt + '';
    
    if(hiliteTxt != ""){
        objRange.text = toExternLink;
    }
}
I dont have the full code now...
I'll post to you later, ok