1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
|
function namedlink(theForm,theType) {
var selected = getSelectedText(theForm);
var linkText = prompt(link_text_prompt,selected);
var prompttext;
if (theType == "URL") {
prompt_text = link_url_prompt;
prompt_contents = "http://";
}
else {
prompt_text = link_email_prompt;
prompt_contents = "";
}
linkURL = prompt(prompt_text,prompt_contents);
if ((linkURL != null) && (linkURL != "")) {
var theText = '';
if ((linkText != null) && (linkText != "")) {
theText = "["+theType+"="+linkURL+"]"+linkText+"[/"+theType+"]";
}
else {
theText = "["+theType+"]"+linkURL+"[/"+theType+"]";
}
addText(theText, "", false, theForm);
}
} |