Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

cfform submit

Guest
Mar 10, 2009 Mar 10, 2009
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!
855
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 11, 2009 Mar 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-o...
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Mar 11, 2009 Mar 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Mar 11, 2009 Mar 11, 2009
oops....double post.....
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Mar 11, 2009 Mar 11, 2009
a little bit more background, like i said i am running this from a sharepoint site displaying the form in a sharepoint web part (not much differant than using an iframe i suppose) i have another form with about ten fields in it doing all kinds of things through the action page, cfinserts, cfmail, cfifs and it all works fine.

I have tried the above code and the URLSessionFormat with no luck.

I have found though that if i don't use "_blank" for the target, all is fine.

I think im going to try and come up with a cfwindow workaround...wish me luck and thanks for the help.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 11, 2009 Mar 11, 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!
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Mar 12, 2009 Mar 12, 2009
LATEST
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.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources