Witam, mam problem z wykonaniem skryptu na ie i opera w ff wszytko ok.
Więc tak oto skrypt:
Kod
  
        function login_sms_clik() {
        
            $('login_sms_error').update();
            $('login_sms').update();
                
            var login_sms = $F('login_sms');
            
            advAJAX.post({
                url: "loginsms.php",
                parameters: {
                    "cmd": "ajaxLoginSms",
                    "login_sms" : login_sms
                },
                
                onSuccess : function(obj) {
                    if (obj.responseJSON.errors == true){
                        $('login_sms_error').update(obj.responseJSON.error_msgs.login_sms_error);
                    } else {
                        $('login_sms_step1').update(obj.responseJSON.html);
                    }
                },
                
                onError : function(obj) {
                }
            });
        }


A to fragment loginsms.php
  1. <?php
  2. if ($_REQUEST['cmd'] == 'ajaxLoginSms') {
  3. $number = mysql_escape_string($_REQUEST['login_sms']);
  4. $smarty->assign('number',$number);
  5. $login_pass=$user->loginSMS($number);
  6. if($login_pass){
  7. }else
  8. {
  9. $error_msgs['login_sms_error'] = &#092;"Brak takiego numeru w bazie\";
  10. }
  11. }
  12. //...
  13.  
  14. if (sizeof($error_msgs))
  15. {
  16. // zatrzymujemy na walidacji
  17. $returnData = array('errors' => true, 'error_msgs' => $error_msgs, 'html' => null);
  18. } else {
  19. // przechodzimy do następnego kroku
  20. $returnData = array('errors' => false, 'error_msgs' => null, 'html' =>$smarty->fetch('login_sms_step2.tpl'));
  21. }
  22. ?>


Błąd z konsoli błędów opery:

Kod

      JavaScript - http://xxx.pl.local/
      Event thread: click
      Error:
      name: TypeError
      message: Statement on line 3485: Type mismatch (usually a non-object value used where an object is required)
      Backtrace:
        Line 3485 of linked script http://xxx.pl.local/js/prototype.js
          return Form.Element.Serializers[method](element);
        Line 1680 of linked script http://xxx.pl.local/js/actions.js
          var login_sms = $F("login_sms");
        Line 1 of  script
          login_sms_clik();
        At unknown location
          [statement source code not available]

Zamiast wstawić templatke badź wywalić błąd usuwa formularz i zostawia puste pole.
Nie zielonego dlaczego nie działa. Z gory dzięki za pomoc.


Problem rozwiazany dla potomności, nie nazywajcie pola formularza i formularza tak samo smile.gif Mój głupi błąd.