Re: location of php file where values are posted by jquery file
Like cricket said, you aren't even using Cake correctly, nor a framework correctly. Your auction file should be turned into a controller. On Nov 17, 4:48 pm, cricket wrote: > On Wed, Nov 17, 2010 at 9:10 AM, Biplab Subedi wrote: > > i am new to cakephp and and trying to write my penny auction code in > > cakephp > > > i have index.php inside auction folder of view, and i call function > > residing at JavaScript/Jquery file commom.js (webroot>>js>>common.js). > > Now i have to post values from common.js to one php page(say > > ajaxauction.php). > > > jQuery.post(".ajaxauctionphp", { all_auctions: auctions , pg_name: > > page_name, hr_delay: hr_delay} , function(data) > > { > > > } > > > so that the value of $data is returned from that php page. and i can > > add events to change the respective value of div at index.php like > > > jQuery('#item_price_'+jQuery.trim(auc_det[0])).html(auc_det[1]); > > > So what i was intended to know that, where should i make the php file > > ajaxauction.php. or in which location i should create the file. > > > hoping to get suitable answer > > It doesn't appear that you're using Cake properly. For one thing, the > only index.php is the one in the app/webroot directory, which catches > all requests (there's another inside app/ but that simply points to > the one inside webroot). You shouldn't be pointing to a > ajaxauction.php file, either. Instead, all of your request code should > be handled by a controller. I suggest you get acquainted with how Cake > works before diving into AJAX requests. It's possible that Cake > doesn't even suit your needs. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: location of php file where values are posted by jquery file
On Wed, Nov 17, 2010 at 9:10 AM, Biplab Subedi wrote: > i am new to cakephp and and trying to write my penny auction code in > cakephp > > i have index.php inside auction folder of view, and i call function > residing at JavaScript/Jquery file commom.js (webroot>>js>>common.js). > Now i have to post values from common.js to one php page(say > ajaxauction.php). > > jQuery.post(".ajaxauctionphp", { all_auctions: auctions , pg_name: > page_name, hr_delay: hr_delay} , function(data) > { > > } > > so that the value of $data is returned from that php page. and i can > add events to change the respective value of div at index.php like > > jQuery('#item_price_'+jQuery.trim(auc_det[0])).html(auc_det[1]); > > So what i was intended to know that, where should i make the php file > ajaxauction.php. or in which location i should create the file. > > hoping to get suitable answer It doesn't appear that you're using Cake properly. For one thing, the only index.php is the one in the app/webroot directory, which catches all requests (there's another inside app/ but that simply points to the one inside webroot). You shouldn't be pointing to a ajaxauction.php file, either. Instead, all of your request code should be handled by a controller. I suggest you get acquainted with how Cake works before diving into AJAX requests. It's possible that Cake doesn't even suit your needs. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
location of php file where values are posted by jquery file
i am new to cakephp and and trying to write my penny auction code in cakephp i have index.php inside auction folder of view, and i call function residing at JavaScript/Jquery file commom.js (webroot>>js>>common.js). Now i have to post values from common.js to one php page(say ajaxauction.php). jQuery.post(".ajaxauctionphp", { all_auctions: auctions , pg_name: page_name, hr_delay: hr_delay} , function(data) { } so that the value of $data is returned from that php page. and i can add events to change the respective value of div at index.php like jQuery('#item_price_'+jQuery.trim(auc_det[0])).html(auc_det[1]); So what i was intended to know that, where should i make the php file ajaxauction.php. or in which location i should create the file. hoping to get suitable answer Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en