several bug fixes

This commit is contained in:
JT Smith 2004-09-20 17:37:34 +00:00
parent ce9cfe43a2
commit 3248a01b2f
5 changed files with 28 additions and 15 deletions

View file

@ -1,9 +1,9 @@
function addHTTP(element) {
if (element.value != "") {
if (!element.value.match(/^\w+:\/\//)) {
if (!element.value.match(/^\w+:\/\//) && !element.value.match(/^\^/) && !element.value.match(/^\//)) {
element.value = "http://"+element.value;
}
if (!element.value.match(/^\w+:\/\/.+\..+/)){
if (!element.value.match(/^\w+:\/\/.+\..+/) && !element.value.match(/^\^/) && !element.value.match(/^\//)){
alert("That does not look like a proper URL. Please check if it is correct.");
}
}