Not returning a value for some reason
<p>Basically I have a script the function "<code>hola ()</code>" that should return the value of 1 if the radio button value is 1. But for some reason when I try to get the return value in another function i never get it.</p>

<p>The form works perfectly.. the only issue is that it doesnt return the value</p>

<p>Can anyone tell me what i did wrong?? thanks</p>

<pre><code>$(document).ready(function(){
    function hola() {
        $("form[name=yN]").show("slow");
        $('input[type=radio]').click( function (){
            var opt = $(this).attr("value");

            if (opt == "1") {
                this.checked = false;
                $("form[name=yN]").hide("slow");
                return 1;
            }

            if (opt == 0) {
                $("p").html ("ok");
                this.checked = false;
            }
        }) 
    }

    $("#iForm").submit( function(event){
        event.preventDefault();

        var user = $("input[name=username]").val();
        var password = $("input[name=password]").val();
        var dbName = $("input[name=dbName]").val();
        var server = $("input[name=server]").val(); 

        $.get("1.php", 
              {username: user, password: password, dbName: dbName, server: server },
              function(data){
                 if (data == "The table PAGE exists" || data == "The table SUBJECTS exists" || data == "The table USERS exists" ) {
                    // CALLING THE hola () function and expecting a return 
                    var opt = hola();
                    $("p").html(data + opt);
                 }
              }
        )
    })
})
</code></pre>

<p>HTML</p>

<pre><code>&lt;!-- Yes or No form --&gt;
&lt;form  name="yN" style= "display: none; margin-left: auto; margin-right: auto; width: 6em"&gt;
&lt;input type="radio" name="yN" value="1"&gt;yes&lt;/input&gt;
&lt;input type="radio" name="yN" value="0"&gt;no&lt;/input&gt;
&lt;button id=1 &gt;click me!&lt;/button&gt;
&lt;/form&gt;

&lt;!-- Login Form --&gt;
&lt;form id="iForm"  style= "display: show"&gt;
&lt;label id="username" &gt;Username&lt;/label&gt;
&lt;input id="username" name="username"/&gt;
&lt;label id="password"&gt;Password&lt;/label&gt;
&lt;input id="password" name="password" /&gt;
&lt;label id="server" &gt;Server&lt;/label&gt;
&lt;input id="server" name="server"/&gt;
&lt;label id="dbName" &gt;dbName&lt;/label&gt;
&lt;input id="dbName" name="dbName"/&gt;

&lt;input type="submit" value="submit" /&gt;
&lt;/form&gt;
&lt;p&gt; &lt;/p&gt;
</code></pre>
