Skip to main content
March 10, 2009
Question

cfform submit

  • March 10, 2009
  • 2 replies
  • 933 views
ok, ultimatly this form will be embedded within a sharepoint page viewer web part, but i am assuming that it's the same principal since it's not working from either. I am using the developer edition of CF8.

I created a form containing a cfselect (populated with query, and yes thats working), the value of this cfselect is checked with a cfif on the action page and that determines which report to generate using cfreport. In my testing enviroment i used iframes to layout everything neatly for simplicity reasons. open the page standalone and it submits fine, do it through the iframe or the sharepoint webpart and i get the all too familiar "Variable X is not defined in Y" !!!

anyone got a fix?

thanks in advance for your help!
    This topic has been closed for replies.

    2 replies

    Known Participant
    March 12, 2009
    I'm still learning too so sorry if my answer screwed you up more. ;-)

    The issue I posted the link about would only be an issue if you were assigning that form variable to a session variable, then trying to pass the session variable through an iframe. So, if you had a statement like this (with proper locking of course):

    <CFSET session.variableX="#form.variableX#">

    Then iframes have an issue on IE unless you add that permissions statement to either the page, or your application.cfc. But it's only necessary (and therefore only helps) if you're dealing with session variables. A regularly passed-through form variable shouldn't matter.

    Good luck!
    March 12, 2009
    no problem....your reply led me to realize i could work around it by not using "_blank" as the target for the action page. So, for now, i have a solution. The other form only submits to it's action page, it never opens it in an external window so i figure thats why it works. This form was launching a blank page to generate the report and thats where i was losing the variable, if only MS would support a target tag for the tabs in IE7, something like:

    target="_tab"

    ...but i figure that would be too easy....i know there is a user setting to open blank pages in tabs but what a nightmare that would be to ensure everyone set theirs up that way!

    Thanks again for all your help.
    Known Participant
    March 11, 2009
    is Variable X by chance a session variable at that point? Are you testing in IE?

    This link has some interesting info about session variables, IE, and iframes. I had a similar problem and this fixed it:
    http://cfsilence.com/blog/client/index.cfm/2008/6/13/Persisting-Session-Variables-Within-An-Iframe-on-IE
    March 11, 2009
    if i understand the question right (sorry kinda learning still) then yes, it passes to the other page and called as #form.range#.

    where do i place the following code? i put it on top of the form page and the action page with no luck? as well as in the HTML head section.

    March 11, 2009
    oops....double post.....