?
Solved

I need help badly here.

Posted on 2002-03-28
5
Medium Priority
?
203 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 280 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
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…
Suggested Courses

762 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