Problem with document.execCommand()

G

Guest

Below is my javaScript function that I am having trouble with. When I set
the bUserInterface parameter to FALSE in the follow statement,
"document.execCommand("CreateLink","false", oSource)", the dialog window
should NOT come up because I have supplied the URL for it from my oSource
parameter I past to my function.

Can anyone tell me why it's not working?

I found this example here:
(http://msdn.microsoft.com/library/d...uthor/dhtml/reference/methods/execcommand.asp)


/// Copy Source to Clipboard
function copytoClipBoard(oSource)
{
//if(window.clipboardData)
// window.clipboardData.setData("URL",oSource);

if (!oSource=="")
{
//Create link
document.execCommand("CreateLink","false",oSource);
document.execCommand("copy");
}
}
 

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,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top