ColdFusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreColdFusion Development

Closed Thread
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old March 11th, 2005, 09:28 AM
bawaite bawaite is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 84 bawaite User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 19 h 50 m 45 sec
Reputation Power: 5
grabbing content which is loacted between tags

what I would like to do is separate page of content from the rest of an html file.

so basically currently I have the html page content going to a variable

the html content would look like this:

Code:
<html>
<head>
<title>Document title</title>
</head>
<body>
text header
 <pre>
main text 
 </pre>
text footer
</body>
</html>


so what I want to do set the content between '<pre> and </pre>' the content doesn't have to be saved its just the main text value that need.

any suggestions

Thank you

Reply With Quote
  #2  
Old March 11th, 2005, 09:45 AM
kiteless kiteless is offline
Moderator
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,627 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 10 h 8 m 55 sec
Reputation Power: 53
Why don't you just capture the main page content using <cfsaveconent> and then drop that variable into the html layout?

<cfsavecontent variable="pageContent">
<cfinclude template="whatever template(s) generate the content for this page" />
</cfsavecontent>

And then in your HTML layout file...

<html>
<head>
<title>Document title</title>
</head>
<body>
text header
<cfoutput>
#pageContent#
</cfoutput>
text footer
</body>
</html>


The Fusebox framework has extensive capabilities in this area and makes generating separate pieces of content simple, and then aggregating them into a final layout simple as well. Check out www.fusebox.org. I also have a sample bookstore application that shows off the layout functions at www.briankotek.com.
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian.
How to Post a Question in the Forums

Reply With Quote
  #3  
Old March 11th, 2005, 12:47 PM
bawaite bawaite is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 84 bawaite User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 19 h 50 m 45 sec
Reputation Power: 5
I'll look throught the fusebox tool in more detail, it might be usfull for other projects, But the main problem is that the file that I am trying to grab the info from, are and can only be an html file, located on a different server, and so I am useing the cfhttp fuction to get the info. the reason for doinging this, is because the content that I need is updated everynight and the people in charge of the other site dont want to have too ftp the info twice.

Any other suggestions

Reply With Quote
  #4  
Old March 11th, 2005, 01:54 PM
kiteless kiteless is offline
Moderator
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,627 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 10 h 8 m 55 sec
Reputation Power: 53
You need to parse the file and strip out what you want. Look at the string functions, specifically mid(), reFind(), reFindNoCase(), find(), and findNoCase().

Reply With Quote
  #5  
Old March 22nd, 2005, 12:53 PM
bawaite bawaite is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 84 bawaite User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 19 h 50 m 45 sec
Reputation Power: 5
I see what I can do with that thank you

Reply With Quote
Closed Thread

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > grabbing content which is loacted between tags


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway