Topic: xajax.getFormValues('form1') problem in IE11, Chrome 32.0.1700.76 m

Hi

I’m experience a problem with passing variables only in IE11 and Chrome (Have not checked Firefox). My code is working fine in IE10. Is there any known issue with the latest browsers?


Login page:

<form name="form1" method="post" action="">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td align="center">USERNAME:</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td align="center"><label for="username_login"></label><input type="text" name="username_login" id="username_login"></td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td align="center">PASSWORD:</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td align="center"><label for="password_login"></label><input type="text" name="password_login" id="password_login"></td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td align="center">&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td align="center"><input type="button" value="Submit" onClick="xajax_login(xajax.getFormValues('form1'))"></td>
            <td>&nbsp;</td>
          </tr>
        </table>
      </form>

xajax_login()

$xajax->registerFunction("login");
function login($ajax_array){
$username = $ajax_array[username_login];
$password = $ajax_array[password_login];
echo "
$username <br>
$password
";
}

LIke I said, in IE10 no problem working 100% but in IE11 and latest chrome the variables are empty (not passing).

Re: xajax.getFormValues('form1') problem in IE11, Chrome 32.0.1700.76 m

Hi,

Have you tried using the xajax debugger? $xajax->configure('debug',true);

The html looks ok. Your use of echo in the login function will mess up xajax on the client side.

Rather than echo the variables try alerting them:

function login($ajax_array){
$resp = new xajaxResponse();
$username = $ajax_array[username_login];
$password = $ajax_array[password_login];
$resp->alert($username.'  '.$password);
return $resp;
}

Try these and get back if you still have the problem.

Ed

If you ever stop learning you may as well dig a hole, crawl in and pull the top over yourself.