$ not function in codeigniter |
[eluser]goldensona[/eluser]
hi i want the autocomplete future in codeigniter , when i am running it show the $not a function. please any one help me Thanks sona
[eluser]WanWizard[/eluser]
CodeIgniter doesn't have an autocomplete, it is server-side code. $ is something used by javascript frameworks, client-side, like for example jquery.
[eluser]goldensona[/eluser]
thanks wan wizard i call the jquery files in the view file using the base_url function but it doesnt call the script file. <script type="javascript" src="<?php echo base_ulr()?>js filesname..?> how could i find the problem. thanks
[eluser]WanWizard[/eluser]
Because it should be base_url()? If you're testing client side javascript, use Firefox and the Firebug extension. It will help you find these kind of problems fast.
[eluser]goldensona[/eluser]
sorry typing mistake in my previous post , i used like that only.in firefox error console show this error $("$ids").autocomplete( is not a function . how could i handle thanks sona
[eluser]WanWizard[/eluser]
I don't know. I assume autocomplete is a function that you need to write, include, download, define, ...
[eluser]danmontgomery[/eluser]
$().autocomplete() is a JS function. $ids is a PHP variable. You're either putting PHP code in a JS file where it isn't parsed, or you're trying to access PHP variables in your JS code... Neither will work
[eluser]goldensona[/eluser]
$("#idname").autocomplete() i worked like this in normal coding it works when i try to implement in codeigniter framework , i got a error in the errorconsole $() is not a function . i dont know why it occur like this thanks noctrum for you reply Thanks
[eluser]dwin102003[/eluser]
can i see your exact code or your code. or try to change from $("$ids") to $("<?=$ids?>") but it is a bit messy. just passing by.
[eluser]goldensona[/eluser]
i post the changed code previously of your post.i find the reason. after adding jquery.noconflict ,my code works well. see more about jquery.noconflict click here to know about jquerynoconflict |
Welcome Guest, Not a member yet? Register Sign In |