[eluser]obiron2[/eluser]
the javascript is running client side.
if you are doing
Code:
function testIfWorks(text){
if (text == "yes") {alert('yep, that did the job')}
}
in your controller/model this is running server side and will do nothing. If you are doing it client side in the #script# tags then text has not been set becuase "return $resul" is only adding $result to the CI object, it is not actually sending it via HTTP. You still need to generate the output using an echo, print or $this->view('your_view',$data) construction.
hope this helps
obiron