Welcome Guest, Not a member yet? Register   Sign In
Ajax msg display help!
#3

[eluser]debow[/eluser]
That was easy enough.

I commented out the following lines and get what I want.
Code:
if ($_POST)
       {
                if ($this->form_validation->run() === TRUE)
                {  
                      $userId = $this->user_model->AddUser($_POST);
                    echo "Registration Successful";
                    
                }
                else
                {
                    echo validation_errors(' ',' ');
                }
        }
        else
        {
          $data['main_content'] = 'home/main_index';
          $this->load->view('includes/template', $data);
        }
        

        //$data['main_content'] = 'home/main_index';
            //$this->load->view('includes/template', $data);
    }


Just have to figure out now how to close the form once I click ok to the "Registration Successfull" popup is displayed.

I'm sure its something simple like adding a close call in the following ajax.
Code:
$.ajax({
                url: "<?php echo site_url('users/add'); ?>",
                type: 'POST',
                data: form_data,
                success: function(msg) {
                    alert(msg);
                }
              });
      return false;


Messages In This Thread
Ajax msg display help! - by El Forum - 10-19-2010, 01:37 PM
Ajax msg display help! - by El Forum - 10-19-2010, 02:02 PM
Ajax msg display help! - by El Forum - 10-19-2010, 02:17 PM
Ajax msg display help! - by El Forum - 10-19-2010, 02:20 PM
Ajax msg display help! - by El Forum - 10-19-2010, 02:33 PM
Ajax msg display help! - by El Forum - 10-19-2010, 02:34 PM



Theme © iAndrew 2016 - Forum software by © MyBB