Solved

ColdFusion.navigate form submit - what am I missing

Posted on 2011-09-02
4
997 Views
Last Modified: 2012-05-12
Scratching my head a bit here, because virtually identical code works elsewhere on the same page - but for some reason, this block doesn't.

Code is pasted below and should be self explanatory.  The action page performs a CFQuery insert and return a single line of text.

Firebug reports the following error;

uncaught exception: ColdFusion.navigate: Form f1 not found

The cfquery insert isn't performed, and there's nothing to suggest that action page is being reached.  The page itself refreshes with the form values in the URL (almost as though the form method was missing).

 
<!--- Exists within a CFOutput Query - #rid# is set with a cfset +1 at the end of each output to generate an ID for each output row --->
<div id="o#rid#">
<form id="f#rid#">
<input type="hidden" name="productid1" value="#ID#" />
<input type="hidden" name="productid2" value="#form.productid#" />
<input type="image" src="/img/btns/btn-add.png" value="submit" onclick="ColdFusion.navigate('/products/search/a_addrelated.cfm','o#rid#','null','null','post','f#rid#')" />
</form>
</div>

Open in new window

0
Comment
Question by:RedBullLee
  • 2
  • 2
4 Comments
 
LVL 39

Expert Comment

by:gdemaria
ID: 36476088

Should be using cfform..   I would also add Name attribute:

<cfform id="f#rid#" name="f#rid#">
0
 

Author Comment

by:RedBullLee
ID: 36476105
Thanks for the very swift reply, gdemaria.

I made the suggested changes, but am experiencing the same still.

As mentioned, I'm suing virtually identical code elsewhere on the page without issue.
0
 
LVL 39

Accepted Solution

by:
gdemaria earned 500 total points
ID: 36476865
I don't see cfoutput tags, be sure your code is nested within cfoutput

Check to see if you have another form nested around this form that would prevent this form from being found.

If that doesn't work, the code you're showing doesn't have a problem, you need to post more code.
0
 

Author Comment

by:RedBullLee
ID: 36477674
Thanks gdemaria,

It was indeed wrapped around another form - I hadn't noticed the others on the page were not.  Removed the outer form tags and it works perfectly now.

Thanks for suggesting that, much appreciated!
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Hi, Even though I have created this Tutorial on My personal Blog, Some people might not able to find my website, So here i am posting it again Today, from the topic it is very clear that i will be showing you here the very basic usage of how we …
CFGRID Custom Functionality Series -  Part 1 Hi Guys, I was once asked how it is possible to to add a hyperlink in the cfgrid and open the window to show the data. Now this is quite simple, I have to use the EXT JS library for this and I achiev…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now