nyromodal ajax form docs or examples?

I’m one of the hundreds of folks confused by nyroModal’s lack of complete examples that make any sense to anyone besides the author. (many folks have pointed out that the docs are useless since they aren’t explicit enough. i cant figure out a damn thing from them)

For such a feature rich plugIn, it’s EXTEMELY difficult to find a single comprehensive example of most of the “features”
(without stackOverflow, nyroModal would be useless, since all the example calls don’t pass any “options” like call backs).
many things that should have been examples are posted in “bugs” in github.
anyways … dude. the docs are inadequate.


I’m trying to open a form within a nyroModal window, and have the form send values to a page via Ajax, and then based on the response, close the window. I know this should be/is easy, but without a SINGLE example or understandable docs … I’m stuck.
So far I have it opening in the window, and submitting in the window … BUT … no ajax.
(not even sure if nyroModal can handle it)

here is what I have for the nyroModal call:

<script type="text/javascript">
    $  ('.nyroModal').nyroModal(
    {
// not sure if these are needed, but without an example, better start guessing!
callbacks: {
    afterClose: function(nm) {
        alert('Handled!');
    }
}
});
</script>

here is my form that is called into the nyroModal window:
note: making the form of class: nyroModal, makes the form submit within the modal. (would make a good example too)

<form name="this" method="post" class="nyroModal" action="/vendor/orderDetail.cfm">
    <cfoutput><input type="hidden" name="oid" value="#oid#"></cfoutput>
    <input type="text" name="comment"><input type="submit" value="Accept Product Request">
</form>

What I am wanting to do:

When user submits the form, I want to send the data via AJAX to the “action” page, which would generate a JSON response, and depending on the response, then close the window.

So, is this possible with nyroModal?

After MUCH MUCH looking, I can’t find a single reference to this functionality, except the “features”, but its not shown how its done.

Can anyone point me to an example or some docs that aren’t locked in a circular reference of obscurity?

Q: What’s inside this thing labeled “mystery Box”? A: Oh you just need to look at the label.

Really?

newest questions tagged jquery – Stack Overflow

About Admin