On Jun 6, 2012, at 1:46 PM, Gary Robinson wrote:

> Leaving aside the typeahead issue for now, suppose that, SOMEHOW, the user 
> gives some input indicating that he wants to see a particular piece of 
> text. Instead of making the user load a new web page to see it, or doing a 
> refresh of the current page, I'd like it to show up by populating a 
> textarea, after the text is retrieved from the server. I know that this is 
> not normally a problem and is done all the time in AJAXy applications, but 
> I'm not finding info on how something like that would be done in the 
> Bootstrap context. I have found info on loading a tab's content dynamically 
> (http://www.mightywebdeveloper.com/coding/bootstrap-2-tabs-jquery-load-content/)
>  
> and loading it into modals 
> (https://github.com/twitter/bootstrap/issues/936), but nothing about just 
> dynamically loading some content into a field on the current page. While 
> PubNub will be great for some things, such as broadcasting the same counter 
> to many pages, it doesn't sound like it's meant for replacing AJAX for 
> general purpose use.
> 
> I'm a bit mystified as to why there's discussion on dynamic loading of data 
> for tabs and modals but that it's hard to find for updating info on the 
> current page. Or is the answer that it's just basically no problem at all, 
> so nobody is writing about it? If that's the case, do you have any general 
> suggestions of a nice toolset or approach that integrates well with 
> Bootstrap?

Loading content into a DOM element is very basic: $(elem).html(new-content). 
Doesn't matter if the new content came from an AJAX call or something already 
on the page. This is nothing to do with Bootstrap, which is probably why you 
haven't seen mention of it in the same context.

Check out http://api.jquery.com, maybe spend a little time browsing it to see 
what other 'gems' you can find ;)

Bill

Reply via email to