javascript hyperlink
<p>Hi I have written a abcd.ftl page which is beeing called in another defg.page 
The abcd.flg page has the fallowing code </p>

<pre><code> &lt;div class="partnerOptInBox"&gt;
     &lt;div id="optInContent"&gt;
      &lt;form name="partnerOptIn"&gt;
       &lt;h4&gt;Want the Latest&lt;/h4&gt;
       &lt;p class="pad10Top"&gt;${partnerOpt.translation}&lt;/p&gt;
       &lt;div class="pad10Top"&gt;
       &lt;input type="radio" name="questionAnswer['${partnerOpt.questionId}']" value="${partnerOpt.getAnswers()[0].answerId}" class="radioButton" /&gt; &lt;label for="questionAnswer['${partnerOpt.questionId}']" class="formLabel pad20Right"&gt;Yes&lt;/label&gt; &lt;input type="radio" name="questionAnswer['${partnerOpt.questionId}']" class="radioButton" value="${partnerOpt.getAnswers()[1].answerId}" /&gt; &lt;label for="questionAnswer['${partnerOpt.questionId}']" class="formLabel"&gt;No&lt;/label&gt;
       &lt;/div&gt;
       &lt;div id="optInError" class="formError" style="display:none;"&gt;Oops... your request did not go through, please try again.&lt;/div&gt;
       &lt;div class="pad15Top"&gt;
        &lt;a href="javascript:submitOptIn();"&gt;&lt;img src="images/theme/btn_opt_in_submit.gif"/&gt;&lt;/a&gt;
       &lt;/div&gt;                        
      &lt;/form&gt;
      &lt;script type="text/javascript"&gt;
function submitOptIn() {
    $('optInError').hide();
    dataString = $('#partnerOptIn').serialize();
    $.ajax({
     data: dataString,
     url: partnerOpt.do,
     timeout: 30000,
     type: "POST",
       success: function(html){
            var newHtml = "&lt;h4&gt;Thank you&lt;/h4&gt;&lt;p&gt;We appreciate your time to respond to our request.&lt;/p&gt;";
            $('#optInContent').html(newHtml);
    },
     error: function(){
      $('#optInError').show();
     }
    });
}
&lt;/script&gt;

     &lt;/div&gt;
    &lt;/div&gt;
</code></pre>

<p>But when I am clicking the submit button on this page its throwing a error saying "javascript:submitOptIn" not defined can any one please let me know what would be the reason for this error asap please THank you </p>
