Craig328's Profile User Rating: *****

Reputation: 1984 Grandmaster
Expert w/DIC++
Active Posts:
3,534 (1.23 per day)
13-January 08
Profile Views:
Last Active:
User is offline Nov 18 2015 12:32 PM

Previous Fields

OS Preference:
Favorite Browser:
Favorite Processor:
Favorite Gaming Platform:
Your Car:
Dream Kudos:
Expert In:

Latest Visitors

Icon   Craig328 <cfloop from=1 to=infinity><cfif IsItFiveOClockYet(Now())><cfbreak></cfif></cffloop><cfset goHome = Now()>

Posts I've Made

  1. In Topic: Javascript code will not execute if a cfdocument tag is used

    Posted 18 Nov 2015

    Very nice! Thanks for sharing!
  2. In Topic: Javascript code will not execute if a cfdocument tag is used

    Posted 16 Nov 2015

    Good for you, man! Thanks for posting back with your solution.
  3. In Topic: Javascript code will not execute if a cfdocument tag is used

    Posted 13 Nov 2015

    Right. Again, the "window.opener" bit is referring to the window that opened the current window. Inside a PDF, since the document is outside the DOM, there is no parent window to refer to.
  4. In Topic: Javascript code will not execute if a cfdocument tag is used

    Posted 13 Nov 2015

    Welcome to DIC Lyndon!

    So, in general terms, what CFDOCUMENT does is allow you to put into a PDF, output that is generated by ColdFusion. So, conceptually, a PDF is being created whenever you run CF code that contains that tag.

    Now, your question is why isn't your Javascript, that sits outside the code block that is contained within the CFDOCUMENT tags not working. Think on that a moment. Javascript can work with anything in it's own and select other DOMs (document object models). In less technical terms, if it's on a web page, it can work with elements on that same web page. But, when you use the CFDOCUMENT tag, the generated HTML content isn't in that web page's in a separate PDF document.

    Essentially, your Javascript that precedes the CFDOCUMENT block can't see the HTML generated content within that block because that block doesn't exist in a DOM that your Javascript snippet can see. It exists in a PDF now.

    You can include Javascript within the CFDOCUMENT block and most times it will function appropriately within the generated PDF (heavy emphasis on "most times"). Your JS snippet is trying to alter the InnerHTML of an element inside the PDF from outside the PDF. You can put it inside the PDF generated block and as long as the triggering event is something that can be done in a PDF then you may still be in luck. This is more of a business logic question though at that point.

    Hope that helps. Good luck and post back here if you have any further questions!
  5. In Topic: Request a ColdFusion Tutorial

    Posted 25 Sep 2015

    I'm not sure if I'm on the team but I'm the resident CF expert and atraub's question was fairly straightforward...and I don't object. :D

My Information

Member Title:
I make this look good
Age Unknown
October 19
Woodstock, GA
Full Name:
Years Programming:
Programming Languages:
ColdFusion, some ASP classic, HTML, Javascript, CSS, SQL...all that happy stuff.

Contact Information

Website URL:
Website URL


Page 1 of 1
  1. Photo

    Craig328 Icon

    11 Mar 2013 - 08:08
    Vamsc443, go ahead and re-check the thread for my response. Also, please understand that everyone who is here helping devs on DIC does so in a volunteer fashion. We don't get paid to render assistance. We do it because we're nice folks trying to help others.
  2. Photo

    vamsc443 Icon

    11 Mar 2013 - 07:52
    Sorry Craig328
  3. Photo

    Craig328 Icon

    08 Mar 2013 - 07:28
    :rolleyes: Yep, I'll get right on that.
  4. Photo

    vamsc443 Icon

    08 Mar 2013 - 07:17
    hi Craig328 i have updated my code also.please look on that
  5. Photo

    Craig328 Icon

    14 Nov 2012 - 06:33
    Why? Did you switch teams?
  6. Photo

    BenignDesign Icon

    14 Nov 2012 - 05:13
    Can I be a lez friend, too?!?!?!
  7. Photo

    Craig328 Icon

    17 Aug 2012 - 06:45
    Only if you'll spoon me (but only when I want it).
  8. Photo

    no2pencil Icon

    17 Aug 2012 - 06:36
    Lez Be Friends?!
  9. Photo

    Craig328 Icon

    23 May 2012 - 12:09
    I am so your friend. Sad panda that!
  10. Photo

    BenignDesign Icon

    16 Dec 2011 - 12:55
    You are not my friend. Now I am a sad panda.
  11. Photo

    Craig328 Icon

    06 Jan 2011 - 12:12
    My dazzling repartee leaves people speechless?
    I dunno.
  12. Photo

    Alex6788 Icon

    06 Jan 2011 - 11:04
    Hey, thanks for adding me as a friend. How is it that you have zero comments?
Page 1 of 1