ajax refresh form

ajax refresh form

hey guys, i am new in jquery, i tried just load a specific div with error msg in a form, works nice the page not reload perfect, the one problem that return for me my full page repeated 4 times in the same page.

example: when i click the button load in index 4 index page :)

i want just load everything inside that div with that class $(".text-danger")

thanks.

userview.php
<div class="row">
        <?php 
        $attributes = array("class" => "form-horizontal", "id" => "userform", "name" => "userform");
        echo form_open("user/index", $attributes);?>
      

            <legend>Sign up Now </legend>
            <div class="form-group">
            <div class="row colbox">

       
            <div class="col-lg-4 col-sm-4">
                <label for="name" class="control-label">Name</label>
            </div>
            <div class="col-lg-8 col-sm-8">
                <input id="name" name="name" placeholder="your name" type="text" class="form-control"  value="<?php echo set_value('name'); ?>" />
                <span class="text-danger"><?php echo form_error('name'); ?></span>
            </div>
            </div>
            </div>
            

            <div class="form-group">
            <div class="row colbox">
            <div class="col-lg-4 col-sm-4">
                <label for="email" class="control-label">Email address</label>
            </div>
            <div class="col-lg-8 col-sm-8">
                <input id="email" name="email" placeholder="type your email here" type="text" class="form-control"  value="<?php echo set_value('email'); ?>" />
                <span class="text-danger"><?php echo form_error('email'); ?></span>
            </div>
            </div>
            </div>


            <div class="form-group">
            <div class="row colbox">
            <div class="col-lg-4 col-sm-4">
                <label for="passconf" class="control-label">Password</label>
            </div>
            <div class="col-lg-8 col-sm-8">
                <input id="passconf" name="passconf" placeholder="your password" type="password" class="form-control" value="<?php echo set_value('passconf'); ?>" />
                <span class="text-danger"><?php echo form_error('passconf'); ?></span>
            </div>
            </div>
            </div>
            
            <div class="form-group">
            <div class="row colbox">
            <div class="col-lg-4 col-sm-4">
                <label for="country" class="control-label">Country</label>
            </div>
            <div class="col-lg-8 col-sm-8">
            
                <?php
                $attributes = 'class = "form-control" id = "country"';
                echo form_dropdown('country',$country,set_value('country'),$attributes);?>
                <span class="text-danger"><?php echo form_error('country'); ?></span>
            </div>
            </div>
            </div>
           
            
            <div class="form-group">
            <div class="col-sm-offset-4 col-lg-8 col-sm-8 text-left">
                <input id="btn_add" name="btn_add" type="submit" class="btn btn-primary" value="Insert" />
                <input id="btn_cancel" name="btn_cancel" type="reset" class="btn btn-danger" value="Cancel" />
            </div>
            </div>
     
        <?php echo form_close(); ?>
        <?php echo $this->session->flashdata('msg'); ?>
        
     
      </div>


    </section>
<script type="text/javascript">
    var frm = $('#userform');
    frm.submit(function (ev) {
        $.ajax({
            type: frm.attr('method'),
            url: frm.attr('action'),
            //data: $('#myform').serialize(),
            success: function (data) {
                $(".text-danger").html(data);
            }
        });
return false;
        ev.preventDefault();
        
    });