1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Don't close OverlayTrigger on form submit?

Discussion in 'XenForo Development Discussions' started by Jaxel, Dec 20, 2013.

  1. Jaxel

    Jaxel Well-Known Member

    So I have a form which appears on an OverlayTrigger. Normally, when you click submit on the form, it closes the overlay and processes the action. Is there a way I can set it so that the action gets processed, but the overlay doesn't get closed?
    Last edited: Dec 21, 2013
  2. Jaxel

    Jaxel Well-Known Member

    The reason I ask for this is I am updating the bbcode overlays for my XenMedio addon:

    View attachment 63414

    It was pretty easy getting AJAX working on this page. It changes pages perfectly fine... I would like to add a comment form to this overlay. So that in addition to browsing comments on this video, a user can post a comment as well. If I view the popout page as a regular page:


    The form works flawlessly. It posts the comment using AJAX and doesn't force a page refresh. However, when I view the page as an overlay, clicking post on the comment form closes the overlay... which is what I dont want. I want people to be able to post comments, without it closing the video.

    Moderator: Please don't post images which contain profanity.
    Last edited by a moderator: Dec 21, 2013
  3. Jaxel

    Jaxel Well-Known Member

    Bump... anyone got any ideas for this?
  4. Jaxel

    Jaxel Well-Known Member

    So in XF 1.3, an "interact" button was added to the new profile posts sidebar widget. This button opens up an OverlayTrigger, with a form where a user can submit a comment to a profile post. I noticed that this form does NOT close the overlayTrigger on submit... so its directly related to my opening question.

    Does anyone know how this was done?
  5. thedude

    thedude Well-Known Member

    Not at my computer right now but did you check the js getting called for that submit?
  6. Jaxel

    Jaxel Well-Known Member

    The problem is... there is no form. At least, I couldn't find one.
  7. Jeremy

    Jeremy Well-Known Member

    The form uses a XenForo.CommentPoster. There is a form, you just need to look or it.
    thedude likes this.
  8. Jaxel

    Jaxel Well-Known Member

    Ah, I see it, its all in comment_simple.js... and it all makes sense. Thanks!
    thedude likes this.

Share This Page