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 7084949
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:21:53+00:00 2026-05-28T07:21:53+00:00

I am trying to get get zombie.js to activate a link that uses javascript.

  • 0

I am trying to get get zombie.js to activate a link that uses javascript. The page I am testing it on is:

 <html>
  <body>
  <div id="test123">
  START_TEXT
  </div>
  <a href="javascript:go()">GO</a><br/>
  <script type="text/javascript">
  go = function() {
  var el = document.getElementById("test123");
  el.innerHTML = "CHANGED";
  }
  </script>
  </body>
  </html>

The Script I am using is:

var zombie = require("zombie");
var browser = new zombie.Browser;

browser.visit( "http://localhost:8000/testpage.html",
        function() {
                browser.clickLink("GO", function(e, browser, status) {
                        var temp = browser.text("div#test123");
                        console.log("content:", temp);
                  });
});

I get the error message:

node.js:201
        throw e; // process.nextTick error, or 'error' event on first tick
              ^
Error: Cannot load resource: javascript:go()
    at History._resource (/home/julian/temp/node_modules/zombie/lib/zombie/history.coffee:75:15)
    at History._pageChanged (/home/julian/temp/node_modules/zombie/lib/zombie/history.coffee:60:21)
    at History._assign (/home/julian/temp/node_modules/zombie/lib/zombie/history.coffee:213:19)
    at Object.location (/home/julian/temp/node_modules/zombie/lib/zombie/history.coffee:51:24)
    at Object.click (/home/julian/temp/node_modules/zombie/lib/zombie/jsdom_patches.coffee:31:59)
    at Object.dispatchEvent (/home/julian/temp/node_modules/zombie/node_modules/jsdom/lib/jsdom/level2/html.js:480:47)
    at /home/julian/temp/node_modules/zombie/lib/zombie/eventloop.coffee:130:16
    at EventLoop.perform (/home/julian/temp/node_modules/zombie/lib/zombie/eventloop.coffee:121:7)
    at EventLoop.dispatch (/home/julian/temp/node_modules/zombie/lib/zombie/eventloop.coffee:129:19)
    at Browser.dispatchEvent (/home/julian/temp/node_modules/zombie/lib/zombie/browser.coffee:220:30)

When I use

browser.evaluate("go()")

it works.
What am I missing?

  • 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-05-28T07:21:54+00:00Added an answer on May 28, 2026 at 7:21 am

    Well it doesn’t seem to understand javascript:code hrefs. Perhaps you can get the url, remove the javascript:-section and evaluate it?

    Disclaimer: I haven’t used zombie.js myself yet.

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

Sidebar

Related Questions

I am trying get the html within .event_recur. $(.entry).each(function(){ alert($(this).find(.event_recur).html()); }); <div class=entry> <p
Trying to get all articles, with unique titles (distinct(title)), that have a body of
I am trying get a div that I have hidden to show in the
Trying to get my css / C# functions to look like this: body {
Trying to get comfortable with jQuery and I have encountered some sample code that
I am trying get content from the link https://....com:8455 where Server's certificate is not
I am trying get Javascript popup calendar control to work which doesnt work. I
I am trying get my hands dirty with async CTP and I noticed that
I am trying get tree view in the web page. I am using jstree
I'm trying get values from a GridView using the following code: foreach (GridViewRow row

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.