Javascript - shows two times
<p>my basic javascripts code shows two times alert on the screen :S
i really look similiar topic but didnt reach anything.</p>

<p>This is the code and works locally</p>

<pre><code>&lt;script type="text/javascript"&gt;
  function validateForm()
  {
    var x = document.forms["formBasvuru"]["namesurname"].value;
    if (x == null || x=="")
    {
      alert("First name must be filled out");
      return false;
    }

    return false;
  }
&lt;/script&gt;
</code></pre>

<p>and this is my form.</p>

<pre><code>&lt;div class="ContextConteyner"&gt;
        &lt;div class="ContextLeft DottedConteyner"&gt;
            &lt;div class="ContextTitle ITCAvantGardeStdMd"&gt;
                Başvuru Yapın,
            &lt;/div&gt;
            {if $send}
            Mesajınız iletilmiştir.
            {else}
            &lt;div class="ContextDetail"&gt;
                &lt;form action="#" id="theForm" name="formBasvuru" method="post" enctype="multipart/form-data" onsubmit="return validateForm()"&gt;
                &lt;div class="InputMConteyner"&gt;
                    &lt;div class="InputConteynerText ITCAvantGardeStdMd"&gt;
                        Adınız Soyadınız
                    &lt;/div&gt;
                    &lt;div class="InputConteynerImage"&gt;
                        &lt;input id="NameSurname_txt" name="namesurname" type="text" /&gt;
                    &lt;/div&gt;
                      &lt;div class="InputConteynerText ITCAvantGardeStdMd"&gt;
                        E-Posta Adresiniz
                    &lt;/div&gt;
                    &lt;div class="InputConteynerImage"&gt;
                        &lt;input id="EMail_txt" name="email" type="text" /&gt;
                    &lt;/div&gt;
                      &lt;div class="InputConteynerText ITCAvantGardeStdMd"&gt;
                        Telefon Numarası
                    &lt;/div&gt;
                    &lt;div class="InputConteynerImage"&gt;
                       &lt;input id="PhoneNumber_txt" name="phone" type="text" value="" /&gt;  
                    &lt;/div&gt;
                    &lt;div class="InputConteynerText ITCAvantGardeStdMd"&gt;
                        Başvurduğunuz Pozisyon
                    &lt;/div&gt;
                      &lt;div class="InputConteynerImage"&gt;
                        &lt;input id="Position_txt" name="pos" type="text" value="{$u}" /&gt;
                    &lt;/div&gt;
                     &lt;div class="InputConteynerText ITCAvantGardeStdMd"&gt;
                        CV göndermek için tıklayın
                    &lt;/div&gt;
                    &lt;div class="InputConteynerImage"&gt;
                        &lt;input type="file" name="file" size="40"&gt;
                    &lt;/div&gt;
                &lt;/div&gt;
</code></pre>

<p>what might be the reason ? I also keep a directory named common . This common directory  has header.tpl and meta.tpl in order to use them in all pages . Can it be a problem for this problem?</p>
