Welcome Guest, Not a member yet? Register   Sign In
xajax dropdown problem

class Testxajax extends Controller

    function Testxajax()

function test_function()
        $objResponse = new xajaxResponse();
    $Ol =array();
    $Ol= $this->Cars_model->getCars();
    $ret = '';
    for($i=0; $i<count($Ol); $i++)
    $ret .= '<option value="'.$Ol[$i]['Model'].'">'.$Ol[$i]['Model'].'</option>';    
    $objResponse->assign('cars', 'innerHTML', $ret);
        return $objResponse;
    function index()
    $data = array();
    $data['title'] = 'Test;
    $data['xajax_js'] = $this->xajax->getJavascript(base_url());
    $data['content'] = '&lt;form name="carform" method="post" action="post"  id="carform"&gt;&lt;select name="cars" id="cars"><option value="">(No Selection)</option></select>&lt;/form&gt;';

    $data['main'] = 'testxajax_view';

I installed xajax on my ci application. Iam trying to fill a dropdown with car models but when i click the dropdown it just comes smaller and its empty. Any ideas?

Theme © iAndrew 2016 - Forum software by © MyBB