Hi, Bernardo, Thanks for your reply. I set the debugging level to 0, but I cannot get any warning messages. I don't know how to debug this problem at IE7.0. This works as expected when I use Firefox. but not use IE7.0
Thanks. On May 4, 3:15 pm, bernardo <[EMAIL PROTECTED]> wrote: > Check the ajax response, there are some warning messages. Note that > everything that is returned is pased to the element to be updated. > Just to see if that is the problem, set the debugging level to 0. > > On May 4, 5:59 pm, seedme <[EMAIL PROTECTED]> wrote: > > > > > Can you help me? > > > I want to using AJAX to populate the data based on the selected value. > > but the following codes work well at FireFox, but not display the > > populated data IE7.0 . Some can help me to find the solutions? > > > My test website's link ishttp://dev.fuzgo.com > > > I need the help ASAP. Thanks. > > > For member register Action > > > Country -> State -> City. > > > At register.ctp file: I used the following code. > > ------------------------------------------------------------------------- > > <?php > > echo $form->input('Member/country', array('class' => > > 'required','label'=>'Country','onChange'=>'javascrip:getStateList(this.valuÂe)','type'=>'select','style'=>'width: > > 250px;', 'selected'=>'0', 'options'=> $this->requestAction('/ > > Countries/ > > select') )); > > > echo $form->input('Member/state', array('class' => 'required', > > 'type'=>'select','id'=>'MemberState', 'style'=>'width:250px;', > > 'onChange'=>'javascrip:getCityList(this.value)', 'options'=>array( '0' > > => 'Select one state/province')));?> > > ------------------------------------------------------------------------ > > > <script> > > function getStateList(sel){ > > new Ajax.Updater('MemberState','/States/select/'+sel, > > {asynchronous:true, evalScripts:true});} > > > </script> > > > At states_controller.php: > > -------------------------------------------------------------- > > function select($id = null){ > > $this -> RequestHandler -> setAjax($this); > > $id = $this->params['data']['form']['country']; > > if(!is_numeric($id)) $id = 2 ; > > $statelists = $this->State->generateList( " country_id > > = $id ", > > 'State.name ASC', null, '{n}.State.id', '{n}.State.name'); > > $this->set('statelists',$statelists); > > $this->render('select','ajax'); > > } > > ------------------------------------------------------------- > > > At select.ctp: > > ----------------------------------------------------------------- > > <?php > > if (isset($statelists) && count($statelists)){ > > foreach($statelists as $key=>$name) { > > $results .= '<option value="'.$key.'">'.$name.'</ > > option>'; > > } > > > }else{ > > > $results = '<option>Re-select a Country! </option>'; > > > } > > > echo $results; > > ?> > > -------------------------------------------------------------------- Hide > > quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
