If you navigate to Tools->Form Options->Advanced, you will see a section for Programming Language which states: "The programming language can only be set when no code exists in the form." To remove the code, you will have to extract the form files from the XSN (File->Extract Form Files). Close the Designer. Now, open the manifest.xsf in notepad.
If you previously had your programming language set as jscript, you'll need to remove the following 3 blocks:
<xsf:file name="script.js">
<xsf:fileProperties>
<xsf:property name="scriptType" type="string" value="userEvents"></xsf:property>
</xsf:fileProperties>
</xsf:file>
<xsf:applicationParameters application="InfoPath Design Mode">
<xsf:solutionProperties scriptLanguage="jscript" fullyEditableNamespace="http://schemas.microsoft.com/office/infopath/2003/myXSD/2007-11-18T21:45:53" lastOpenView="view1.xsl"></xsf:solutionProperties>
</xsf:applicationParameters>
<xsf:scripts language="jscript">
<xsf:script src="script.js"></xsf:script>
</xsf:scripts>
Save the manifest.xsf with the sections removed. Now open it up again in the Designer and the language dropdown under Tools->Form Options->Advanced will be enabled.
Hope this helps,