JavaScript if statment don't work
<p>I need help with javascript. here is my problem:</p>

<pre><code>&lt;script type="text/javascript"&gt;
    function validateForm() {
        var ime = document.getElementById('ime');
        var prezime = document.getElementById('prezime');
        var telefon = document.getElementById('telefon');
        var datum = document.getElementById('datum');
        var patt1 = /^\+[0-9]+$/;
        if (telefon.match(patt1) == null) {
            alert("Niste dobro uneli broj");

        }
        if (ime.value.length == 0 &amp;&amp; prezime.value.length == 0 &amp;&amp; telefon.value.length == 0 &amp;&amp; datum.value.length == 0) {
            alert("Niste dobro uneli podatke!");
            return false;
        }

    }
&lt;/script&gt;
&lt;form action="popup.php" method="post" onsubmit="return validateForm()"&gt;Vase ime:
    &lt;input type="text" name="ime" id="ime"&gt; &lt;br/&gt;
    Vase prezime:
    &lt;input type="text" name="prezime" id="prezime"&gt; &lt;br/&gt;
    Broj telefona:
    &lt;input type="text" name="telefon" id="telefon"&gt; &lt;br/&gt;
    Datum rodjenja:
    &lt;input type="text" name="datum" id="datum"&gt; &lt;br/&gt;
    &lt;input type="submit" name="save" value="sacuvaj"&gt;
&lt;/form&gt;
</code></pre>

<p>I don't understand why <code>telefon.match(patt1)==null)</code> doesn't work. Please help!</p>
