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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:39:44+00:00 2026-05-28T02:39:44+00:00

if i use this: $(document).ready(function() { pjs = Processing.getInstanceById(EyeCanvas); console.log(pjs); } then pjs is

  • 0

if i use this:

$(document).ready(function() {
    pjs = Processing.getInstanceById("EyeCanvas");
    console.log(pjs);
}

then pjs is always undefined

when i use this:

function test() {
    pjs = Processing.getInstanceById("EyeCanvas");
    console.log(pjs);
}

and trigger test() with a button then pjs = D.Processing, as it should be.

I load the scripts in this order:

    <script type="text/javascript" src="processing-1.3.6.min.js"></script>
    <script type="text/javascript" src="jquery1-7-1.js"></script>
    <script type="text/javascript" src="script.js"></script>

How can i work with pjs without have people to press a button?

  • 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-28T02:39:45+00:00Added an answer on May 28, 2026 at 2:39 am

    Please try this – just to also see if it is a timing issue – note the swapped scripts too:

    <script type="text/javascript" src="jquery1-7-1.js"></script>
    <script type="text/javascript" src="processing-1.3.6.min.js"></script>
    <script type="text/javascript" src="script.js"></script>
    
    var tId,pjs,cnt=0;
    $(document).ready(function() {
      tId=setInterval(function() {
        pjs = Processing.getInstanceById("EyeCanvas");
        console.log(cnt+':'+pjs);
        if (pjs) clearInterval(tId);
      },500);
    });
    

    and what does this say?

    var tId,pjs,cnt=0;
    $(document).ready(function() {
      pjs = Processing.getInstanceById("EyeCanvas");
      console.log(cnt+':'+pjs);
      if (!pjs) tId=setInterval(function() {
        pjs = Processing.getInstanceById("EyeCanvas");
        console.log(cnt+':'+pjs);
        if (pjs) clearInterval(tId);
      },500);
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I generally use this in jquery $(document).ready(function() { //stuff } I was just on
Hi I use this simple jquery : $(document).ready(function(e) { $(#langs_current).click(function(){ $(#langz).toggle(350); }); }); Currently
Hello I use this code for toggle some css properties: $(document).ready(function() { $('li#last').toggle(function(){ $(this).css({border-bottom:
Hello guys on my blog I use this script: jQuery(document).ready(function () { jQuery(.postbox).hover(function ()
I use this code to create a simple jquery carousel animation: $(document).ready(function() { var
$(document).ready(function(){ $(a).click(function() { $(#content).load($(this).attr(href)); window.location.hash = $(this).attr(href); return false; }); }); So I use
Currently I use this code: <script type=text/javascript> $(document).ready(function() { var url = http://openexchangerates.org/latest.json; $.getJSON(url
I use this function to validate my form: <script type=text/javascript> $(document).ready(function() { $('#tracks_form').validate({ submitHandler:
i have problem with my code. I use this JS $(document).ready(function() { //Default Action
I have this: <script> $(document).ready(function() { $(a#a_test).fancybox({ titleShow : false, width: 400, height: 120,

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.