Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Gordon Saxby 1465 posts 1887 karma points
    Feb 12, 2009 @ 15:20
    Gordon Saxby
    0

    asp:LoginStatus gives a JavaScript error

    I have placed an asp:loginStatus control into my Master page and it shows, but clicking either "log in" or "log out" causes a JavaScript error.

    I have the following form definition in my master page
    [code]


    [/code]

    and the code for the LoginStatus control is
    [code]

    LogoutText="Log Out" LogoutPageUrl="/default.aspx" logoutAction="Redirect" />
    [/code]

    The JavaScript error is

    "Object doesn't support this property or method"

    And the line of code is
    [code]
    function doPostBack(eventTarget, eventArgument) {
    if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
    theForm.
    EVENTTARGET.value = eventTarget;
    theForm.__EVENTARGUMENT.value = eventArgument;
    theForm.submit(); <<-- THIS ONE
    }
    [/code]

    So, what am I doing wrong or what am I missing?

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Feb 12, 2009 @ 15:25
    Dirk De Grave
    0

    Hi Gordon,

    Have you tried to use:

    [code]

    [/code]

    leaving out the id attribute on the form tag?

    Cheers,
    /Dirk

  • Gordon Saxby 1465 posts 1887 karma points
    Feb 12, 2009 @ 15:44
    Gordon Saxby
    0

    Hi Dirk, I've just tried it - and the result is the same :-(

    The generated form tag looks like this
    [code]


    [/code]

    Do I need to make any changes in the web.config (or elsewhere) in order to use these ASP controls?

    Oh yes, I am using umbraco v 4.0.0.RC (Assembly version: 1.0.3274.29916) which I "think" is RC2? (I haven't upgraded to the release version as I've not had the time or found any instructions on how to!)

  • Gordon Saxby 1465 posts 1887 karma points
    Feb 12, 2009 @ 19:25
    Gordon Saxby
    0

    Found the problem - there was a HTML button (INPUT TYPE=Button") on the page. I changed it to an asp:Button and now the LoginStatus control works fine:-s

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies