webgui/www/extras/addHTTP.js
2003-11-13 12:36:43 +00:00

8 lines
241 B
JavaScript

function addHTTP(element) {
if (!element.value.match("http://")) {
element.value = "http://"+element.value;
}
if (!element.value.match(/^http:\/\/.+\..+/)){
alert("This is not a valid url. Please check if it is correct.");
}
}