Solved

I need help badly here.

Posted on 2002-03-28
5
194 Views
Last Modified: 2006-11-17
Hi,

This is a sample of code i got from http://msdn.microsoft.com/

<HTML>
<BODY>
<H1 unselectable="on">Creating a Link and Retrieving the URL</H1>
<script>
function AddLink()
{//Identify selected text
var sText = document.selection.createRange();
if (!sText==""){
    //Create link
     document.execCommand("CreateLink");
     //Replace text with URL
     if (sText.parentElement().tagName == "A"){
       sText.parentElement().innerText=sText.parentElement().href;
       document.execCommand("ForeColor","false","#FF0033");
     }    
  }
else{
    alert("Please select some blue text!");
  }  
}
</script>
<P unselectable="on">Select any portion of the following blue text, such as "My favorite Web site". Click the button to turn the selected text into a link. The text will be changed to the URL that you specify.</P>
<P style="color=#3366CC">My favorite Web site is worth clicking on. Don't forget to check out my favorite music group!</P>

<BUTTON onclick="AddLink()" unselectable="on">Click to add link</BUTTON>
</BODY>
</HTML>



I'm wondering, is there a way to customize the CreateLink dialog box? What I mean is, I don't want to use the default dialog box, instead I would like to use my own .. is it possible to do that?
0
Comment
Question by:hating_it
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 12

Expert Comment

by:lexxwern
ID: 6902064
i guess no; because the dialog box is generated by the browser and not the document; experts correct me if im wrong;

but you can ask your visitor to change skins;-)

lexxwern
0
 

Author Comment

by:hating_it
ID: 6909545
Hmmz ... i really do need some advice badly from all the experts out there ...
0
 
LVL 12

Accepted Solution

by:
lexxwern earned 70 total points
ID: 6918234
well; there are more questions asking similar things;

maybe you look there as this Q hsn't got that much attention; but im anyway quite sure that the answer in no.

lexxwern
0
 

Expert Comment

by:ComTech
ID: 6936920
Hello hating_it, I have added some points to your account should you wish to reopen another question, and gain the advice you are looking for.

Regards,
ComTech
CS Admin @ EE
0
 

Expert Comment

by:beebop
ID: 7228222
Yes, you can simply open a popup window and have a textbox in there and then run createlink in the opening document from the popup window
if you specify an url in the createlink function it will not open the dialog box but create a link directly
execcCommand("createLink","http://www.mysite.com")

Beebop
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this article, we'll look how to sort an Array in JavaScript, including the more advanced techniques of sorting a collection of records either ascending or descending on two or more fields. Basic Sorting of Arrays First, let's look at the …
Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question