Welcome Guest, Not a member yet? Register   Sign In
javascript calling controler without form
#5

[eluser]dippy[/eluser]
[quote author="attos" date="1254249935"]You are correct. To pass a parameter to the controller you should add a 'data' element to the ajax call. The trick is that it has to be a javascript object.

Lets assume you some how get the id into a variable, called id.

Your ajax call should look like this (plan text, no code highlighting, I noticed that highlighting the code chops off the <?php and ?&gtWink:[/quote]

so if i wanted to just include a .js script to the view the php wont render will it?

i have to add the js to lets say: $data['extraHeadContent'] =


is there anyway around this? i try and use external js when im building a full site with ajax calls.

any thoughts on this?

other than that i got it going. thank you.


Messages In This Thread
javascript calling controler without form - by El Forum - 09-24-2009, 02:13 PM
javascript calling controler without form - by El Forum - 09-25-2009, 07:21 AM
javascript calling controler without form - by El Forum - 09-25-2009, 10:08 AM
javascript calling controler without form - by El Forum - 09-29-2009, 07:45 AM
javascript calling controler without form - by El Forum - 09-29-2009, 07:33 PM
javascript calling controler without form - by El Forum - 09-30-2009, 02:09 PM
javascript calling controler without form - by El Forum - 10-01-2009, 09:45 AM
javascript calling controler without form - by El Forum - 10-01-2009, 09:48 AM
javascript calling controler without form - by El Forum - 10-01-2009, 11:06 AM
javascript calling controler without form - by El Forum - 10-01-2009, 11:25 AM
javascript calling controler without form - by El Forum - 10-09-2009, 10:39 AM



Theme © iAndrew 2016 - Forum software by © MyBB