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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T02:43:48+00:00 2026-06-02T02:43:48+00:00

I wrote an extedned plugin based on jCrop to crop mulitple images one after

  • 0

I wrote an extedned plugin based on jCrop to crop mulitple images one after another.

I developed and debugged using Chrome and everything worked fine without any JavaScript issues. When i came to test in Explorer it fell over and threw a script error that wrote out

jcrop api is null or not an object

So my javascript is simply…

var jcrop_api; //Global var to be used thorugh out the client

//some code here

//jCrop documention tells us to use this to assign itself to an object.
//I look for both because i use .net masterpages and sometimes not.

$('#SourceImage, #body_SourceImage').Jcrop({},function () { jcrop_api = this; });


//some more code but not far down the line i need to set jCrop options using API

jcrop_api.setOptions({
           boxWidth: bw,
           onSelect: updateCoords,
           minSize: [thisImage.Min.Width, thisImage.Min.Height],
           aspectRatio: thisImage.AspectRatio
       });
 jcrop_api.setImage('../cache/uploads/' + fileName);

That all work in Chrome and i can change images using a global trigger. I have no idea why it does not work in IE?

  • 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-02T02:43:50+00:00Added an answer on June 2, 2026 at 2:43 am

    Indeed jCrop does show in the documentation the exact line that you use. But the IE JavaScript engine is unforgiving.

    What you need to do is use this line to assign the api to a var

    var jcrop_api;
    
    $(document).ready(function () {
    
    jcrop_api = $.Jcrop($('#SourceImage, #body_SourceImage'), {});
    

    Then do the rest. For some reason this in IE refferes back to the entire DOM instead of the callback function of jCrop and fails to assign, leaving your API variable as nothing.

    This change does not affect Chrome, FF or anything else.. and is a bit more clearer any way.

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

Sidebar

Related Questions

I wrote a small internal web app using (a subset of) pylons . As
I wrote my code using this article at msdn as a primary helper My
I wrote an application using ASP.NET MVC, in this application I have an Index
I have wrote a code that can read an excel 2007 file using Microsoft
I am using acts_as_nested_set in my rails app. (extended with awesome nested set plugin).
I extended from org.eclipse.ui.editors and defined the editor-id in plugin.xml as MyEditorId. I wrote
I recently wrote a new Perl script to kill processes based on either process
Here is a related manager I wrote: class PortfolioItemManager(models.Manager): use_for_related_fields = True def extended(self):
Wrote a quick Java proggy to spawn 10 threads with each priority and calculate
I wrote a custom URL rewriting module, to take certain paths and map them

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.