Jump to content

Search the Community

Showing results for tags 'getjson'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 1 result

  1. I am wondering if my problem has a link with the previous bog I wrote about some hours ago... I have an ajax call to pages. The code is based on: The only difference is that since I use the TemplateFactoryEngine, I must add an exit() command in the code. So, in my template file (controller), I wrote this: if($config->ajax) { $json = array( 'id' => $page->id, 'title' => $page->title, 'body' => $page->body, 'photos' => $photos ); // Output your json echo json_encode($json); // halt template rendering exit(); }else{ $view->set('photos',$photos); } and the AJAX call is made by script: $('#menuAlbum li').on('click', function () { var url = $(this).find('.chemin').text(); $.getJSON(url, function (data) { if (data) { .... Now the weird part: When I am logged, everything is fine. When I am not logged, no data is returned. ($this->halt() does not work in that context) I receive no error, I checked that the script was running when not logged (the url is retrieved). How can data can be fetched when logged and not fetched when not logged?
×
×
  • Create New...