Welcome Guest, Not a member yet? Register   Sign In
Validation on IE7
#5

[eluser]taewoo[/eluser]
Since CI community is so giving, i shall give back. Smile

Controller/method that gets called
Code:
function search_club_name($city, $state, $name)
    {        
        header('Content-Type: application/json');
        $this->load->model('club_model');    
        $club_names = $this->club_model->getByClubUrl( $city, $state, $name );
        echo count($club_names);
    }

And the AJAX code

Code:
var url = '/ajax/search_club_name/'+  city_string + "/" + state_string + "/" + name_string;
        new Ajax.Request(url, {
              method: 'get',
              onComplete: function(response) {
                  //alert('Complete: ' +  Object.inspect(response.responseText));
                  if(response.responseText == 0) {
                      submitClubForm();
                  } else {
                      var msg = 'Club name"' + name_string + '" has been taken for city of '+ city_string +', '+ state_string + '. Please choose a different name/city combination.'  
                      alert(msg);
                  }
              }
          });


Messages In This Thread
Validation on IE7 - by El Forum - 08-25-2008, 04:34 PM
Validation on IE7 - by El Forum - 09-02-2008, 06:11 AM
Validation on IE7 - by El Forum - 09-02-2008, 11:39 AM
Validation on IE7 - by El Forum - 09-02-2008, 04:30 PM
Validation on IE7 - by El Forum - 09-02-2008, 04:48 PM
Validation on IE7 - by El Forum - 09-02-2008, 05:00 PM
Validation on IE7 - by El Forum - 09-05-2008, 08:02 PM



Theme © iAndrew 2016 - Forum software by © MyBB