Solved

I need help badly here.

Posted on 2002-03-28
5
189 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
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
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…

757 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now