|
Hello
I was wondering if anyone could possibly help, im looking to create a javascript function that will validate whether or not a user entry into a text element of form is actually in the correct URL format.
This is my form code at the moment.
<input type="text" size="70" id="inurl" name="inurl" value="">
<input type="button" value="Request URL" id="suburl" onClick="document.Assignment1.updateURL(document.getElementById('inurl').value)">
</form>
Thanks
Mark
<Added>
Hello
I was wondering if anyone could possibly help, im looking to create a javascript function that will validate whether or not a user entry into a text element of form is actually in the correct URL format.
This is my form code at the moment.
<input type="text" size="70" id="inurl" name="inurl" value="">
<input type="button" value="Request URL" id="suburl" onClick="document.Assignment1.updateURL(document.getElementById('inurl').value)">
</form>
Thanks
Mark
<Added>
Hello
I was wondering if anyone could possibly help, im looking to create a javascript function that will validate whether or not a user entry into a text element of form is actually in the correct URL format.
This is my form code at the moment.
<input type="text" size="70" id="inurl" name="inurl" value="">
<input type="button" value="Request URL" id="suburl" onClick="document.Assignment1.updateURL(document.getElementById('inurl').value)">
</form>
Thanks
Dave
<Added>
Hello
I was wondering if anyone could possibly help, im looking to create a javascript function that will validate whether or not a user entry into a text element of form is actually in the correct URL format.
This is my form code at the moment.
<input type="text" size="70" id="inurl" name="inurl" value="">
<input type="button" value="Request URL" id="suburl" onClick="document.Assignment1.updateURL(document.getElementById('inurl').value)">
</form>
Thanks
Dave
|
|
|
Call this function on the event where you want check for validation and should work without any hindrance
function validateURL()
{
lengthValue = Trim(document.getElementById(txtURL).value);
lengthValue = lengthValue.length;
if(lengthValue != 0)
{
var j = new RegExp();
j.compile("^[A-Za-z]+://[A-Za-z0-9-]+\.[A-Za-z0-9]+");
lengthValue = Trim(document.getElementById('txtWeb').value);
if (!j.test(lengthValue))
{
alert(Please enter valid URL.");
return false;
}
}
|
|
|
Call this function on the event where you want check for validation and should work without any hindrance
function validateURL()
{
lengthValue = Trim(document.getElementById(txtURL).value);
lengthValue = lengthValue.length;
if(lengthValue != 0)
{
var j = new RegExp();
j.compile("^[A-Za-z]+://[A-Za-z0-9-]+\.[A-Za-z0-9]+");
lengthValue = Trim(document.getElementById('txtWeb').value);
if (!j.test(lengthValue))
{
alert(Please enter valid URL.");
return false;
}
}
|
|
|
Call this function on the event where you want check for validation and should work without any hindrance
function validateURL()
{
lengthValue = Trim(document.getElementById(txtURL).value);
lengthValue = lengthValue.length;
if(lengthValue != 0)
{
var j = new RegExp();
j.compile("^[A-Za-z]+://[A-Za-z0-9-]+\.[A-Za-z0-9]+");
lengthValue = Trim(document.getElementById('txtWeb').value);
if (!j.test(lengthValue))
{
alert(Please enter valid URL.");
return false;
}
}
|
|
|
Call this function on the event where you want check for validation and should work without any hindrance
function validateURL()
{
lengthValue = Trim(document.getElementById(txtURL).value);
lengthValue = lengthValue.length;
if(lengthValue != 0)
{
var j = new RegExp();
j.compile("^[A-Za-z]+://[A-Za-z0-9-]+\.[A-Za-z0-9]+");
lengthValue = Trim(document.getElementById('txtWeb').value);
if (!j.test(lengthValue))
{
alert(Please enter valid URL.");
return false;
}
}
|
|
|
Call this function on the event where you want check for validation and should work without any hindrance
function validateURL()
{
lengthValue = Trim(document.getElementById(txtURL).value);
lengthValue = lengthValue.length;
if(lengthValue != 0)
{
var j = new RegExp();
j.compile("^[A-Za-z]+://[A-Za-z0-9-]+\.[A-Za-z0-9]+");
lengthValue = Trim(document.getElementById('txtWeb').value);
if (!j.test(lengthValue))
{
alert(Please enter valid URL.");
return false;
}
}
|
|
|
Call this function on the event where you want check for validation and should work without any hindrance
function validateURL()
{
lengthValue = Trim(document.getElementById(txtURL).value);
lengthValue = lengthValue.length;
if(lengthValue != 0)
{
var j = new RegExp();
j.compile("^[A-Za-z]+://[A-Za-z0-9-]+\.[A-Za-z0-9]+");
lengthValue = Trim(document.getElementById('txtWeb').value);
if (!j.test(lengthValue))
{
alert(Please enter valid URL.");
return false;
}
}
|
|
|
Call this function on the event where you want check for validation and should work without any hindrance
function validateURL()
{
lengthValue = Trim(document.getElementById(txtURL).value);
lengthValue = lengthValue.length;
if(lengthValue != 0)
{
var j = new RegExp();
j.compile("^[A-Za-z]+://[A-Za-z0-9-]+\.[A-Za-z0-9]+");
lengthValue = Trim(document.getElementById('txtWeb').value);
if (!j.test(lengthValue))
{
alert(Please enter valid URL.");
return false;
}
}
|
|
|