Results 1 to 2 of 2

Thread: Help - Code on Site which I do not recognise

  1. #1
    Join Date
    Jun 2008
    Posts
    5

    Help - Code on Site which I do not recognise

    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

  2. #2
    Join Date
    Dec 2010
    Location
    Redhill, Surrey
    Posts
    8
    This is just a script to check the values of a form and prevent it from sending if incorrect values are entered. While this code is not going to send information elsewhere the question of where it came from is a worrying one. What level of conrol do you have over the domain and what have you used to build the site?

Similar Threads

  1. Voucher Code Site
    By mrkidd85 in forum Web Design, HTML Reference and CSS
    Replies: 1
    Last Post: 05 Mar 2011, 01:56 PM
  2. Search engines won't even recognise my domain name?!
    By Ewan in forum General Questions
    Replies: 1
    Last Post: 11 Aug 2009, 10:31 PM
  3. I NEED HELP or Some one to code my site..
    By dionciel in forum General Questions
    Replies: 1
    Last Post: 24 Feb 2006, 09:49 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •