Page 1 of 1

while check a checkbox call a file using ajax

Posted: Thu Apr 29, 2010 5:13 am
by thamizh
i want to replicate the same concept as in this link

pls have a look at this link
http://www.offersforshoppers.com/NewOFS ... nt-coupons

i asked to replicate left side menu's with checkbox
when the user checks the particular mobile category it gives the search result
to my knowledge i think it is done using ajax and php
i should also implement this with the same technology
but i dont have any knowledge abt ajax
anybody can show me a direction how to start with

with my coding i got the checkbox listing
i need the ajax + php implementation

help me pls :(

Re: while check a checkbox call a file using ajax

Posted: Thu Apr 29, 2010 12:27 pm
by Christopher
I would recommend looking at a Javascript library like jQuery for this. It will make dealing with click events very easy and work in all browsers.

Re: while check a checkbox call a file using ajax

Posted: Fri Apr 30, 2010 12:49 am
by thamizh
yeah i implement the design with jquery but i need to implement the technical part
u can see in the link
when the user checks the checkbox he can find the results with pagination
same thing i need to implement using php

i just stored all the checked checkboxes values in the array (using javascript)
and reading this post checkbox values using php in a separate search.php
based on the checkbox values i need to frame a query and produce the result in the search result page
without any postback of the page where the jquery menu is placed
i dont have any idea or guidance to do this
pls help me out of this :(

thanks for your valuable suggestion

Re: while check a checkbox call a file using ajax

Posted: Fri Apr 30, 2010 9:55 am
by katierosy
If you know some thing about ajax, and you want to do it in little more easy way.
You may see http://jquery.com and see the tutorial on ajax.post(),
you will get number of ways on how to call a php file using ajax. And how to fill a div with the results obtained.
$("#divid").html('data - which has content of php file');

I hope that you will be able to do it. If you will spend some time with jquery ajax methodology and Jquery Selectors.

Re: while check a checkbox call a file using ajax

Posted: Mon May 03, 2010 2:28 am
by thamizh
Thank you very much

i applied ajax post
yet another doubt i have ..
how to split the response.text data using php as array of elements (properly using foreach loop) code
i googled it but no use
can any one help out in this issue