Solved

CFWindow form submit error

Posted on 2009-06-30
8
626 Views
Last Modified: 2013-11-19
Hello experts,
I am trying to implement cfwindow with a simple form survey. I have tried a bunch of different approaches culled from pages all over the internet, but  I always end up with "error retrieving markup for element ..."  and the target page goes 404..

I think I've tried a million combinations, but get the error no matter what I do.
<cfajaximport tags="cfwindow, cfform, cfdiv">
<script language="javascript">
var mycallBack = function(){}
var myerrorHandler = function(errorCode,errorMessage){ alert("[In Error 
Handler]" + "\n\n" + "Error Code: " + errorCode + "\n\n" + "Error Message: " + 
errorMessage);} 
</script>
<cfwindow name="window1" title="CFML Window" draggable="false"
        resizable="false" initshow="true" height="250" width="250" x=375 y=0>
  
    <cfform name="projectform" action="ask_the_speaker.cfm" method="post" >
    Would you like to submit a question for our keynote speakers? <cfinput type="text" name="projectname"><br>
  
    <cfinput type="submit" value="Create" name="mysubmitbutton" 
onClick="ColdFusion.navigate('ask_the_speaker.cfm','window1',mycallBack,myerrorHandler,
'POST','projectform');">
 
    </cfform>
 
</cfwindow>
 
(by the way, my code below was adapted from http://www.webmasterkb.com/Uwe/Forum.aspx/cold-fusion/16239/How-to-POST-FORM-within-CFWINDOW   to give cred where credit is due)..

Open in new window

0
Comment
Question by:FIATECH
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
8 Comments
 
LVL 39

Accepted Solution

by:
gdemaria earned 500 total points
ID: 24748146

CFform automatically submits asyncronously when within a CF object such as cflayout or cfdiv
I think that counts for cfwindow as well.

You don't need the javascript at all..


<cfwindow name="window1" title="CFML Window" draggable="false"
        resizable="false" initshow="true" height="250" width="250" x=375 y=0>
  
    <cfform name="projectform" action="ask_the_speaker.cfm" method="post" >
         Would you like to submit a question for our keynote speakers? 
        <cfinput type="text" name="projectname"><br>
  
       <cfinput type="submit" value="Create" name="mysubmitbutton">
 
     </cfform>
 
</cfwindow>

Open in new window

0
 

Author Comment

by:FIATECH
ID: 24748887
thanks for responding but that didn't fix the problem. I had tried the simple approach first off and got progressively more exotic as things didn't work.
Unfortunately, I still get the same error message.  Does the page work for you? I am wondering if there is just something wrong with our server config or version of CF or something.
0
 
LVL 39

Expert Comment

by:gdemaria
ID: 24748952
what's in ask_the_speaker.cfm ?

Did you try making it just "hello world"...
0
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

 
LVL 39

Expert Comment

by:gdemaria
ID: 24749057
It does work for me, i created a file ask_the_speaker.cfm
with just a "Hello World" statement in it.  

0
 

Author Comment

by:FIATECH
ID: 24795219
yes, I can make it work with just hello, but when I stick a form in there it crashes and burns.  I needed to launch something so I just used the cfwindow to ask the user if they'd take a little survey and I put a link to a regular form page in there. That worked.  Not as slick as I was hoping for, but functional.
0
 
LVL 39

Expert Comment

by:gdemaria
ID: 24795304

Since it works with the "Hello"  the problem is in your ask_the_speaker.cfm file which you haven't posted yet.   I asked for it above.  

Not sure why you went for the low-tech solution,  that's your choice if you need to move along, but there's no reason to believe at this point that I am unable to solve this issue.


0
 
LVL 39

Expert Comment

by:gdemaria
ID: 24830514
@FiaTech, do you want to work this to it's conclusion?
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
There’s a good reason for why it’s called a homepage – it closely resembles that of a physical house and the only real difference is that it’s online. Your website’s homepage is where people come to visit you. It’s the family room of your website wh…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question