ashaffiliates
23 Mar 2011, 11:23 AM
Hi,
Recently discovered the following code on my site which i do not recognise.
I think it may be some sort of hacking attempt to pass details onto other site or something - please can anyone help as I am definitely sure this has no place on that page of my site - http://bit.ly/bnqpE7
<script language="javascript" type="text/javascript">
function contactform(usraction)
{
var myFrom = document.contactus;
if(usraction == 'submit')
{
if(myFrom.name.value=="")
{
alert('Please enter your name.');
myFrom.name.focus();
return false;
}
if((myFrom.email.value=="") || (myFrom.email.value.indexOf('@')==-1) || (myFrom.email.value.indexOf('.', myFrom.email.value.indexOf('@')+2)==-1) || (myFrom.email.value.lastIndexOf('.')==myFrom.email.value.length-1))
{
alert('You must enter a valid email');
myFrom.email.focus();
return false;
}
if(myFrom.comments.value=="")
{
alert('Please enter comments.');
myFrom.comments.focus();
return false;
}
myFrom.submit();
return true;
}
if(usraction == 'cancel')
{
myFrom.name.value="";
myFrom.email.value="";
myFrom.comments.value="";
return false;
}
}
</script>
Please help
Cheers
Ash
Recently discovered the following code on my site which i do not recognise.
I think it may be some sort of hacking attempt to pass details onto other site or something - please can anyone help as I am definitely sure this has no place on that page of my site - http://bit.ly/bnqpE7
<script language="javascript" type="text/javascript">
function contactform(usraction)
{
var myFrom = document.contactus;
if(usraction == 'submit')
{
if(myFrom.name.value=="")
{
alert('Please enter your name.');
myFrom.name.focus();
return false;
}
if((myFrom.email.value=="") || (myFrom.email.value.indexOf('@')==-1) || (myFrom.email.value.indexOf('.', myFrom.email.value.indexOf('@')+2)==-1) || (myFrom.email.value.lastIndexOf('.')==myFrom.email.value.length-1))
{
alert('You must enter a valid email');
myFrom.email.focus();
return false;
}
if(myFrom.comments.value=="")
{
alert('Please enter comments.');
myFrom.comments.focus();
return false;
}
myFrom.submit();
return true;
}
if(usraction == 'cancel')
{
myFrom.name.value="";
myFrom.email.value="";
myFrom.comments.value="";
return false;
}
}
</script>
Please help
Cheers
Ash