OK, new (but related) problem.

I'm using a modal window to edit records.  When I click to edit the first
record, it loads the edit window with that records data.  Cool.  Close the
window, click on the second record, and the data for the first record is
still in the form and remains there until I refresh the page.

I am using this method to call the edit window:

<a href="#CGI.script_name#?a=edit&assetid=#getassets.assetid#"
data-toggle="modal" data-target="##editmodal" role="button" class="btn
btn-small pull-right">Edit</a>

I tried some of the no-cache tricks, thinking it might be a caching issue,
but that caused no content to be loaded in the body of the modal window.

Is there a solution to this?

Thanks

Pete


On Wed, Nov 14, 2012 at 1:33 PM, Cameron Childress <[email protected]>wrote:

>
> 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:353268
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to