sundance1980
MIS
I am not a javascript programmer at all and you can probably tell by my question Any way I am trying to add a prompt for people to create link. The problem is that the \ is not coming up when I submit.
theText = "<a href=directory\" " + url + "\" target=\"_blank\"><u>" + txt + "<\/u><\/a>";
Result= <a href=aimages"test.PDF" target="_blank"><u>My Link</u></a>
Goal = <a href=aimages\test.PDF" target="_blank"><u>My Link</u></a>
full script
theText = "<a href=directory\" " + url + "\" target=\"_blank\"><u>" + txt + "<\/u><\/a>";
Result= <a href=aimages"test.PDF" target="_blank"><u>My Link</u></a>
Goal = <a href=aimages\test.PDF" target="_blank"><u>My Link</u></a>
full script
Code:
function doLink() {
url = prompt("Enter file name (eg. document1.PDF):", "Enter name");
if (url != null) {
txt = prompt("Enter the text description for this link:", "Enter text description");
if (txt != null) {
theText = "<a href=aimages\" " + url + "\" target=\"_blank\"><u>" + txt + "<\/u><\/a>";
addText(theText);
}
}
}
[\code]