Welcome Guest, Not a member yet? Register   Sign In
how can i call the function from my controlller in view.
#1

[eluser]khmer angkor[/eluser]
Quote:$js = 'onClick="some_function()"';

echo form_button('mybutton', 'Click Me', $js);

withConfusedome_function() how can i call the function from my controlller
#2

[eluser]hvalente13[/eluser]
You have to put it in <head></head>, in your html file!

In Derek Allard's blog, he has one video tutorial for ajax.. But he gives some hints and tips that we can use like the $data['extraheader'] and in our views we put it like this:

Code:
<head>
<title>My Page</title>
<?=(isset($extraheader))?$extraheader:''?>
</head>

We can had things in our controller to the head tag by assining like this:

Code:
$data['extraheader'] = "[removed]
function some_function()
[removed]";

Hope this helps
#3

[eluser]khmer angkor[/eluser]
thanks for your replied.




Theme © iAndrew 2016 - Forum software by © MyBB