rosmith Posted June 20, 2008 Share Posted June 20, 2008 I am using the INCLUDE command to include HTML document B into HTML document A. I would also like to be able to include part, but not all, of HTML document B into HTML document C. Can anyone tell me how to include part of a document and can it be done without compromising the ability to call all of that document? Thanks for any help. Quote Link to comment Share on other sites More sharing options...
corbin Posted June 20, 2008 Share Posted June 20, 2008 Which part of it do you want to get? How do you tell when the desired part ends? So on. Vague question, vague answer. Quote Link to comment Share on other sites More sharing options...
DarkWater Posted June 20, 2008 Share Posted June 20, 2008 I'm not too sure why you need to include an HTML document into another HTML document...And no, I'm not aware of a way to just include from a certain point. I mean, I'm pretty sure it can be done, but it would be really complicated. Show me an example of what is in documents A, B, and C. Quote Link to comment Share on other sites More sharing options...
rosmith Posted June 20, 2008 Author Share Posted June 20, 2008 The specifics involve an HTML document which contains a listing of events chronologically. At one place in the web site, I want to show the entire list (approximately four months worth). At another place, I want to show only a portion of the events (approximately two weeks worth). I don't have the option of utilizing a database and specifying a date range. I need to be able to be able to call the information from an HTML file. Quote Link to comment Share on other sites More sharing options...
DarkWater Posted June 20, 2008 Share Posted June 20, 2008 How in the world do you not have the option of using a database? Nearly every reputable web host these days offers at least SOME MySQL support with a package that has PHP. Doing the whole "include part of an HTML document" thing is going to be ridiculously convoluted and not guaranteed to work if something changes. Quote Link to comment Share on other sites More sharing options...
rosmith Posted June 20, 2008 Author Share Posted June 20, 2008 The details of why a database option in not available to me are not relevant to my question, nor would I bore the forum with the office politics which make it so. I'm trying to work within the limitations which I have been given. If it's not possible to achieve simply within those limitations, good enough. But if someone can help me, then great. Quote Link to comment Share on other sites More sharing options...
DarkWater Posted June 20, 2008 Share Posted June 20, 2008 Sorry then, I really don't think I can help with this. It's not going to function the way you expect every time if you change things.. Quote Link to comment Share on other sites More sharing options...
rosmith Posted June 20, 2008 Author Share Posted June 20, 2008 Thanks anyways. Quote Link to comment Share on other sites More sharing options...
phpzone Posted June 20, 2008 Share Posted June 20, 2008 I don't know why you can't use a database, but I don't want to be bored by office politics, this I agree :-) You need to see if there is any pattern to the structure of your 'B' document, look into perl regular expression and see if you can parse with Regular Expressions. Or, if you can't use a database but can use CSV files why not put the data in a CSV file? (Or would you call this a database too) Or, put the data into an XML file and parse that where required. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.