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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:00:22+00:00 2026-05-25T03:00:22+00:00

I have a modalpopupextender control that is used to upload and crop an image

  • 0

I have a modalpopupextender control that is used to upload and crop an image before saving it to the file system.

MPE shows a file upload control first, when the user uploads a file, it shows the cropping section beneath it with the uploaded image. It works the first time, it shows the image and using Jcrop javascript/jquery file, I can crop the frame and save the cropped image.

The code that initializes Jcrop is below in the jQuery(window).load function.

  $.Jcrop(image).setOptions({
        onChange: update,
        onSelect: update,
        aspectRatio: myRatio,
        bgColor: 'white',
        bgOpacity: 0.5
    });

But the problem happens when the user tries to upload another file again without closing the popup. It does not run the update method for jcrop which I believe only runs on the first time the popup is loaded. I need to attach something like a live event handler to it but i’m unable to do so. I tried attaching a bind event as below but it does not work.

$.Jcrop(image).bind('setOptions', { onChange: update,
        onSelect: update,
        aspectRatio: forcedRatio,
        bgColor: 'black',
        bgOpacity: 0.6
    }, function () {
        alert('test');
    });

Has anyone used JCrop in a similar fashion before or any ideas on how to handle this?

  • 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-25T03:00:23+00:00Added an answer on May 25, 2026 at 3:00 am

    For future visitors, I was able to make it work by having the setOptions event inside the window.focus instead of window.load.

    jQuery(window).focus(function () {
        $.Jcrop(image).setOptions({ ..... });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have ModalPopupExtender that contains a UserControl that basically consists of a GridView and
Have you used VS.NET Architect Edition's Application and System diagrams to start designing a
I have this page where in i have a ModalPopupExtender. Now the panel that
I have a model pop extender control like: <cc1:ModalPopupExtender ID=basketPopUp runat=server PopupControlID=Panel1 PopupDragHandleControlID=PopupHeader Drag=true
I have buttons contained within a repeater. A ModalPopupExtender is used to confirm event
I have a ModalPopupExtender control and a panel which contains a iframe. The ModalPopupExtender's
I have a ModalPopupExtender(mpe) which will show when a asp:button is clicked. The button
I have a Yes linkbutton that trigger a popup (ModalPopUpExtender) The popup contain a
I have a modal popup extender tied to a asp:panel control that I want
I have a ModalPopupExtender that allows a customer to apply payment info. It has

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.