Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8426865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T04:38:41+00:00 2026-06-10T04:38:41+00:00

I started using zombiejs, but i have some begginer questions: 1.) How testing ajax

  • 0

I started using zombiejs, but i have some begginer questions:

1.) How testing ajax calls ?
For example i have php ajax action (Zend)

 public function ajaxSomeAction()
 {
    $oRequest = $this->getRequest();
    if($oRequest->isXmlHttpRequest() === false || $oRequest->isPost() === false) {
        throw new Zend_Controller_Action_Exception('Only AJAX & POST request accepted', 400);
    }

  //process check params...
 }

My zombiejs testing code throws http 400.

2.) How fire jquery plugins public methods ? For example i have code:

(function($) {

 $.manager.addInvitation = function()
 {
    //some code ....
 }

 $.manager = function(options)
 {
    //some code
 }
})(jQuery);

I try:

Browser.visit(url, function(err, browser, status) 
{
   // not work
   browser.window.jQuery.manager.addInviation();

   // also not work
   browser.document.jQuery.manager.addInvitation();
   browser.window.$.manager.addInvitation();
   browser.evaluate('$.manager.addInvitation();');

})

3.) How modifiy header with zombiejs ? For exmaple i want add header x-performace-bot:zombie1 to request send using visit method

Browser = require('zombie');
Browser.visit(url, {debug:true}, function(err, browser, status) 
{
    //send request witch header x-performace-bot
});
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T04:38:43+00:00Added an answer on June 10, 2026 at 4:38 am

    After quick testing (on zombie 0.4.21):

    ad 1.
    As you’re checking ($oRequest->isXmlHttpRequest()) if request is an xml http request, you have to specify (in zombie) X-Requested-With header with a value of XMLHttpRequest.

    ad 2.

    // works for me (logs jQuery function - meaning it's there)
    console.log( browser.window.jQuery );
    // that works to...
    browser.window.$
    

    Your code must be undefined or there are some other errors in Javascript on your page.

    ad 3.
    There’s a header option, which you can pass just as you do with debug.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I started using emacs and slime to develop some little service. I have found
Just started using Blueprint CSS and now playing with the grids but have a
I started using Prestashop yesterday so I’m a total beginner, but I've got some
Just started using fadein/fadeout - it's functioning but with problems. I have a set
I started using Pyant recenently to do various build/release tasks but have recently discovered
I started using Foundation 3 from Zurb yesterday but the documentation they have provided
Started using Visual Studio 2012 RC since yesterday, We have one WCF solution. Whenever
I started using the Mojolicious library for testing and everything was working fine in
I started using entity inheritance today with core data, does anyone have any experience
I started using EF 4.1 code first. I have a entity table like this:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.