Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TypeError: theForm.submit is not a function with asp:LoginStatus

i found one similar problem here but i'm not sure how to apply it here, or if it can be.

the problem is that the asp:LoginStatus button is doing nothing; i can't log out.

the javascript error is:

TypeError: theForm.submit is not a function
theForm.submit();

which is coming from script that is injected by asp.net:

<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['ctl01'];
if (!theForm) {
    theForm = document.ctl01;
}
function __doPostBack(eventTarget, eventArgument) {
    if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
        theForm.__EVENTTARGET.value = eventTarget;
        theForm.__EVENTARGUMENT.value = eventArgument;
        theForm.submit();
    }
}
//]]>
</script>

i watched __doPostBack. eventArgument is not getting a value. not sure if that's the real problem though.

eventTarget   : "ctl00$HeadLoginView$HeadLoginStatus$ctl00"
eventArgument : ""

any ideas as to why the asp:LoginStatus button is doing nothing?

like image 259
wazz Avatar asked Aug 28 '14 02:08

wazz


1 Answers

sry to bother you all with this. after two days i just figured out the problem: i put a paypal button on the page, along with a paypal image.

<img src='https://www.paypal.com/en_US/i/btn/btn_donate_SM.gif' id="submit" alt='Donate' />

that image was inside the anchor/link to paypal, but i'm quite sure the real problem was id="submit". the form did not like that.

like image 189
wazz Avatar answered Sep 30 '22 01:09

wazz