So I'm using Bootstrap to develop this site. I'm using the modal class to display a modal when a button is clicked to show a revision history of the contents of the site, which is updated every quarter. Eventually this is going to get very unwieldy if the history is put in the main html file. Is it possible to have the the list data in another file and have the modal pull it?
Here is the code I'm using:
<div class="modal hide fade" id="chipRevision">
<div class="modal-header">
<a class="close" data-dismiss="modal">x</a>
<h3>CHIP Revision History</h3>
</div>
<div class="modal-body">
<ul>
<h1>June 2012</h1>
<li>PTB letter retired</li>
<li>ADN letter version date changed to 04/17/2012</li>
<li>CAQ letter version date changed to 05/30/2012</li>
<li>CSC letter version date changed to 05/01/2012</li>
<li>ROL letter version date changed to 04/17/2012</li>
<li>CAF version date changed to 05/31/2012</li>
<li>CHIP Member Guide version date changed to 0312</li>
<li>Comparison Charts version date changed to 0512</li>
<li>Letters with version date changed to 03/08/2012: ACR, AMW, APC, APL, BOL, BOR, CIF, CIQ, CMW, CRC, CRP, CSM, DNS, DRL, E1R, ECN, EFX, EMC, EMI, EPM, EPR, ERN, HCC, HNR, HPC, HPD, LRR, MPC, MPL, PFN, PLN, PRN, RAC, RCN, RFN, RLN, SMI, TCD, TEG, UPR, VAC, VIK, VRR</li>
</ul>
</div>
</div>
So ideally I would like to put that ul in a separate file and reference it there. Is there an easy way to do this, or should I just put this stuff at the bottom and deal with it?
Posts
Is it sad that I was looking for the +1 arrow for this post? I spend too much time on StackOverflow =D
Alternatively, you can simply make an iframe in HTML to pull in another HTML file that is simply this content. Then you don't need javascript or any server side resources.
This is correct.
With some "creative" css you could also put it at the bottom of the page, so as to be the least amount of unwieldy possible, and have it display wherever you please anyway. However, in order of usability, iframes, js, and this method are all categorically inferior for this purpose than either asp or php.
For what it's worth, php is absolutely simple to learn, especially for functionality this basic. And asp is actually just C# but on the internet, or so it looks like to me, unless I am completely off-base.
It's not a problem of the actual display. It's a revision history with the most recent first, so the few people using this (it's not actually on the web) would really only care what was done in the last quarter, but the rest of the history is there if they want it. It was mainly to avoid the main html file getting too long, but just having it in a separate page entirely isn't a bad idea. I'll give it some thought. (the modal looks really cool though)