Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Submit form within popup? (Problems.)

djh_djh_ New
edited February 2014 in Vanilla 2.0 - 2.8

I have a custom upload plugin which I want to run in a popup. It doesn't use any of vanilla's upload classes because I want it to use ImageMagick rather than GD, and I couldn't figure out enough of the code to change Vanilla's default behaviour. But anyway...

When I submit the upload form (in the popup), the php file containing the upload functions and output HTML is run in an invisible iframe. None of the javascript controlling the elements in the upload form works, either, whereas it does if the upload form is opened as its own page. Ideally I'd want the entire operation to occur within the popup as it would normally.

What would be the best way to approach this? Thanks.

Comments

  • Options
    hgtonighthgtonight ∞ · New Moderator

    How are you loading the page in a pop-up? Is the popup part of the root document (inserted directly in the DOM) or is it inserted via iframe?

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Options

    The only way I could fathom was to put a link to the page in a div and add this to the head:

        $(document).ready(function() {
            $('a.UploaderButton').popup();
        });
    
  • Options
    hgtonighthgtonight ∞ · New Moderator

    Adding the class "Popup" to any link will automatically load its content in the modal popup.

    When working with popups, you have a be a little more explicit to make sure certain assumptions are covered. Mind sharing a link to your site, or the source of your plugin?

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

Sign In or Register to comment.