On Wed, Nov 14, 2012 at 1:13 PM, Pete Ruckelshaus <[email protected]>wrote:

> Yeah, that's what I get for just glancing at the docs.  This
> <a data-toggle="modal" href="remote.html" data-target="#modal">click me</a>
> worked like a charm.


Great!


> Next up, is there a way to submit a form within the
> same modal window?  Sorry for the questions, I've been doing almost
> entirely server-side stuff for the past few years.
>

You can actually have someone submit the form in the modal just like any
other page. Then it will make a round trip tot he server and refresh the
underlying page (the one that opened the modal).

Alternately, you can have a button in the modal make a javascript call and
do a jQuery AJAX call to submit the data, without causing the underlying
page to refresh. You can then close the modal using some of the code you
should be able to find in the documentation.

There are a bunch of ways you can solve the problem, but I'd read up on the
whole she-bang a bit before trying to cut/paste anything from Stack
Overflow (or this list) to solve your problem. I'd put down the IDE for a
bit, get a coffee and take a long read in the jQuery docs around the AJAX
methods.

http://api.jquery.com/category/ajax/

You should be able to chain those calls along with the Bootstrap modal
stuff to get where you want to be.

-Cameron

-- 
Cameron Childress
--
p:   678.637.5072
im: cameroncf
facebook <http://www.facebook.com/cameroncf> |
twitter<http://twitter.com/cameronc> |
google+ <https://profiles.google.com/u/0/117829379451708140985>


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:353167
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to