Kurbel Posted January 2, 2014 Share Posted January 2, 2014 Hi Guys, I'm new to ProcessWire and really like it. I developed a few Wordpress Templates for Customers and Friends, finally got feed up with it for sites that are not blogs and decided I need something more flexible but not more complicated. So far PW does seem to fit the bill quite nicely However I've run into a problem that I can't get my head around and by now I'm not sure if it's am Issue with my jQuery or my PW or something in between. Consider this Code: jQuery: $(document).ready(function() { $("#button").click(function(){ $.ajax({ type: "POST", url: "news-fetcher/", data: { start: 1, end: 5 }, success: function(data,status){ alert(data); } }); }); }); news-fetcher, this template: <?php $start = $input->post->start; $end = $input->post->end; echo "Start: $start End: $end"; ?> For some reason - that I can't figure out for the live of me - both input variables end up empty. Things I checked so far: - URL returns a 200 OK status code - news-fetcher.php is a template - jQuery is loaded and working - response get's returned, alert is triggered - custom post request (Postman Chrome extension) returns the same result I'm sure it's something blatantly obvious that's awry here, but for whatever reason I'm entirely unable to find it. After staring at this problem for quite a few hours, every input would be very much appreciated! Cheers, Kurbel Link to comment Share on other sites More sharing options...
Kurbel Posted January 2, 2014 Author Share Posted January 2, 2014 Hello,no idea how that happend, but for some reason it seems to work all of a sudden. Problems magically disappearing into thin air. Nice way to start the year! 4 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now