wanted to include jquery in masterpage, but as soon as I did that - my login page stopped working... in chrome console I'm getting:
uncaught TypeError: Cannot read property 'onsubmit' of null
from stack I can see that it is here:
Sys.WebForms.PageRequestManager._initialize('ctl00$ScriptManager1', document.getElementById('aspnetForm'));
in firefox:
this._form is null
this._onsubmit = this._form.onsubmit;
and that error is in ScriptResource.axd?=...
and this causes that I can't just click on the Login button - it does nothing... on the other hand - everything works in Opera... even better - if I am to remove:
<script src="http://ajax.microsoft.com/ajax/jquery/jquery-1.5.min.js" type="text/javascript" />
then everything works fine (tried also other versions of jquery)... now the best is that other pages - that also have buttons and events, work... I've even changed the login page not to use Login control... and it still doesn't work... I'm really confused right now...
My colleague found a solution by an accident... if you change:
<script src="http://ajax.microsoft.com/ajax/jquery/jquery-1.5.min.js" type="text/javascript" />
to
<script src="http://ajax.microsoft.com/ajax/jquery/jquery-1.5.min.js" type="text/javascript"></script>
it magically starts to work... now... this should be xhtml... can anyone explain to me WHY there is a difference here?!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With