ASP Form Browser Incompat?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • isoquin
    New Member
    • Jul 2007
    • 48

    ASP Form Browser Incompat?

    This is an odd one. I have a group of users who all need to sign onto site X each with a unique password. Site X has a simple form with a password field and submit button. The submit method is POST and the action takes it to an ASP page (apologies if this is the wrong forum).

    In order to save my users a little time, I built a page on my domain (which is not site X) that mimics that form, automatically fills in the person's unique password, and submits it. Therefore, each user can get automatically signed into their account on site X based on a single link click that first opens a page on my domain. Sounds weird, I'm sure.

    Now, this little technique works fine in Firefox and Safari. However, IE doesn't seem to work with it. The password will be filled in, and the form will be submitted, but the page that gets returned is the login screen on domain X itself. With the browsers that work, the returned page is the logged in user dashboard. This is very odd to me, as I would have thought that it was all back-end ASP validation, and it would have nothing to do with the browser. Form code is below, if anyone is interested. Any ideas why ASP would react differently to IE and work fine for everything else on simple form submission?

    Code:
    <body onLoad="document.form1.password.value='<?php echo $_GET["password"] ?>';document.form1.submit();">
    <!-- the GET above pulls info from the link, via PHP.  the HTML output is correct after this is done -->
    
    <form NAME="form1" METHOD="POST" ACTION="http://www.siteX.com/submitpage.asp?user_id=<?php echo $_GET["user_id"] ?>">
    <!-- the GET above pulls info from the link, via PHP.  the HTML output is correct after this is done -->
    
    <input TYPE="HIDDEN" NAME="Validate" VALUE="1">
    	Password: <input TYPE="password" NAME="password" id="password" SIZE="20"><br><br>
    		<input type="submit" value="Submit" name="submit1">
  • jeffstl
    Recognized Expert Contributor
    • Feb 2008
    • 432

    #2
    That is weird.

    I wonder if the IE version being used has anything to do with it?

    The only other thing I would wonder if maybe Site X has a browser check on form submission and denies access to doing something like that if the user is using IE?

    I'm not sure. Very strange since hte output HTML file is going to be identical (all being generated from the same web server so as you say output would be identical regardless of browser.)

    Hmmm..I would start with the IE version and search for problems with IE version X and form submission maybe?..heh..no t sure..anyone else?

    Comment

    • jhardman
      Recognized Expert Specialist
      • Jan 2007
      • 3405

      #3
      A likely possibility is the site uses some sort of browser detection along with the form handling. Anyone using ff is probably using the latest version, but someone using IE might be using something out of date and so might be redirected to a different version of the login form. Check the URL to make sure they are correct.

      Another possibility is that on that one comp the pwd is wrong. I would double-check that too. Also, check to see if one of the currently working comps works if you switch to IE.

      Let me know if this helps.

      Jared

      Comment

      • isoquin
        New Member
        • Jul 2007
        • 48

        #4
        I've had many of the same ideas as both of you, and I keep coming up scratching my head. If I simply try to log in directly to their site (not through the remote form on my site), the url and source is exactly the same, regardless of browser. Javascript in the source checks browser, but it is limited to this:
        Code:
        browserName = navigator.appName;
        	browserVer = parseInt(navigator.appVersion);
        
        	if ((browserName == "Netscape") && (browserVer >= 4 )) {
        	   if (!window.menubar.visible)
        	   	window.menubar.visible = true;
        	   if (!window.toolbar.visible)
        	   	window.toolbar.visible = true;
        	}
        The passwords are correct in both cases. I know this because the PHP pulls the password straight from the link, and the link is the same on all browsers. I also verified by changing the password field to a text field, and then dropped the password in a javascript alert. It's solidly the same all round. Lastly, if you put the *wrong* password into IE (or another browser), you get redirected to a "your username and/or password is incorrect" page. Whereas if you put in the correct password in IE, the response is the login screen, without the incorrect password error, (which is dynamically generated, not javascript or some page-triggered item).

        As for the comp: I tried the same link across different browsers in the same comp, as well as across various computers. This is really bewildering. I'm tempted to try and contact the webmaster of the site just to ask what in the world their ASP does that might lead to that.

        Comment

        • DrBunchman
          Recognized Expert Contributor
          • Jan 2008
          • 979

          #5
          I think it would be worth asking - the webmaster can hardly complain if you are trying to make it easier for users to access their site.

          Please let us know if you get anything back.

          Dr B

          Comment

          Working...