CodeIgniter Forums
$ not function in codeigniter - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: $ not function in codeigniter (/showthread.php?tid=33221)



$ not function in codeigniter - El Forum - 08-19-2010

[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


$ not function in codeigniter - El Forum - 08-19-2010

[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.


$ not function in codeigniter - El Forum - 08-19-2010

[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


$ not function in codeigniter - El Forum - 08-19-2010

[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.


$ not function in codeigniter - El Forum - 08-19-2010

[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


$ not function in codeigniter - El Forum - 08-19-2010

[eluser]WanWizard[/eluser]
I don't know. I assume autocomplete is a function that you need to write, include, download, define, ...


$ not function in codeigniter - El Forum - 08-19-2010

[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


$ not function in codeigniter - El Forum - 08-19-2010

[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


$ not function in codeigniter - El Forum - 08-20-2010

[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. Big Grin


$ not function in codeigniter - El Forum - 08-20-2010

[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