just a small thing i'd like this little bit of code to not need some selected text to function... in other words id like to be able to click on the insert button i have and have it just apear inline with where the cursor is in the text area it does a great job if i select a letter or group of letters but id like it not to need letters selected... does this make any sense?

function
xxhrxxThis(from) { 
strSelection = document.selection.createRange().text 
if (strSelection == "") { 
return false; 
} 
else document.selection.createRange().text = "<hr width=100% />" + strSelection 
+ "" 
return;
}

http://www.greatcakes2go.com/new_3.html

example page for what im tring to do...

thanks in advance for any help im so confused :(

Your code not working in Firefox. Maybe you could check this link:
http://www.massless.org/mozedit/

where you can find how to make it working in Firefox too.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.