Once again I'm going to try to cover a few Ask a Jedi questions at once. Here is the first one:
I'm trying to set a "double dynamic" variable. It is currently:<cfset myXMLDoc.feed.newsletterpubs.file[#LoopCount#].description.XmlText = "Hello">
However, the "newsletterpubs" portion is also dynamic (variable is "#ftp_select"). How can I incorporate 2 dynamic portions into this cfset statement?
You already had half the solution. Bracket notation can be used as many times as you want. So to replace the newsletterpubs with a var, just use another bracket:
<cfset myXMLDoc.feed[ftp_select].file[LoopCount].description.XmlText = "Hello">
You will also notice I got rid of the # sign in loopCount, it isn't necessary. Next question:
Can you do a article explaining how to use the application.cfc? I can't figure out how the request method works for the life of me...it'd be great if you could help me out!
Funny you ask that - as I'm presenting on it at MAX next week. I'll be doing an hour long session on it, and Simon Horwith is doing a 90 minute workshop on it, so you will have two places to learn about the new feature. Kind of a non-answer I realize, sorry. Let's hit another one:
How do I embed a PDF in a HTML document?
I assume you may have missed it, but CFMX7 added support for PDF generation with the cfdocument tag. If you don't have CFMX7, there are other options as well. ActivePDF has been around for quite some time. I've never used them, but they are an alternative. Another option is iText, a free Java-based PDF generator. I haven't used it either so I can't comment on how well it works.
Lastly, a BlogCFC question:
Kudos on your BlogCFC code. Maybe I missed something, but how are you adding pictures to your posts in BlogCFC?
I'm not doing anything special. I'm just adding IMG html tags. I am looking into ways to make it easier, but it will be after the 4.0 release.
Archived Comments
In regards to pictures in blog comments. I suggest swapping out the textarea in the editor for a rich text html editor which will allow you to insert images with ease. I prefer the Javascript FCKEditor. Their default implementation needs a little work on their cf connector, but other than that, it's great and cross browser compliant.
I get a request for this once a week. ;) It's not going to happen. What I will do is try to make it easier to add FCK, KTML, or whatever.
I once made a write-up on integrating fckeditor with BlogCFC:
http://www.waterswing.com/b...
I think that you mised the point of question 3:
How do I embed a PDF in a HTML document?
Teh way the question reads to me indicates me that they aren't asking how to create a PDF document out of HTML, they are asking how to have a PDF document *within* an HTML document. Best response would be to just link to the PDF, but the following document shows how to do it, at least in IE PC:
<a href="http://www.planetpdf.com/ma...">Embedding PDFs within HTML files</a>
I think that the article mentions Netscape working with one of the types of embedding, but my Firefox 1.0.7 with Acrobat reader 7 installed pops up an Acrobat plug in error stating: This operation is not allowed.
want PDF within HTML? all you need <iframe/> baby! :)
I also want to add that FOP is another alternative to generating PDFs from CF. We use it to do very complex layouts, dynamic headers/footers, multiple columns, etc, all easily done from CF.