We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16892
    • 107 Posts
    Running:
    Apache/1.3.34
    PHP Version 4.4.2
    MODx 0.9.2.1 (rev 1005)

    OS/Browser
    WinXp
    Win2k
    WinME
    Firefox 2.0
    IE 6.0

    Plugins
    PHx 2.01
    Maxigallery 0.5 rev 49
    Pip
    Saveme

    WebLogin is set up and running correctly in Firefox 2.0. It properly logs a user in and and out, with one exception.

    However, in IE 6.0.2800.1106, the login doesn’t work at all. The same page is returned upon submission. There are no errors or messages showing in the error log or the message file, or the page.

    The page is uncached.

    This is the snippet call:
    [!WebLogin? &loginhomeid=`30` &logouthomeid=`65` &logouttext=`Sign Out` &tpl=`tpl_login_archon`!]
    


    This is the tpl:
    <!-- #declare:separator <hr> --> 
    <!-- login form section-->
            <form id="loginForm" method="post" name="loginfrm" action="[+action+]">
    
              <div class="loginForm">
                <label class="small">Username<input type="text" id="username" name="username" title="Username" tabindex="1" onkeypress="return webLoginEnter(document.loginfrm.password);"  value="[+username+]" size="12"/></label>  
                <input type="password" id="password" name="password" title="Password" tabindex="2" onkeypress="return webLoginEnter(document.loginfrm.cmdweblogin);"  value="Password" size="12"/>
    <input type="image" name="cmdweblogin" src="[(rb_base_url)]/images/bg/button_signin.gif" value="button">
              </div>
    
            </form>
    <hr>
    <!-- log out hyperlink section -->
    <a class="signout" href='[+action+]'>[+logouttext+]</a>
    


    Any help would be appreciated.

    Thanks.
      • 25663 MODX Staff
      • 12,272 Posts
      IE does not understand image type inputs because it only Posts a submit_x and a submit_y, but not play submit, which is what the weblogin code looks for. Tweak that in the weblogin include and you should be fine.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 16892
        • 107 Posts
        Here’s how I resolved the problem.

        In the WebLogin snippet, go to line 72:

        Original line 72:
        $isPostBack		= count($_POST) && isset($_POST['cmdweblogin']);
        


        and change it to:
        $isPostBack		= count($_POST) && isset($_POST['cmdweblogin_x']);
        


        This corrects the problem in IE and does not break it in Firefox 2.0.

        A google search on ’input type image +ie’ resulted in me finding this link:
        http://www.webmasterworld.com/forum21/9694.htm which helped me resolve the issue.

        Thanks for the pointer, ryan.
          • 25663 MODX Staff
          • 12,272 Posts
          Thanks for publicly recording it! Probably should add that to the default code to begin with. smiley
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me