Solved

ColdFusion.navigate form submit - what am I missing

Posted on 2011-09-02
4
1,024 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
[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
  • 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

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

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

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 …
I spent nearly three days trying to figure out how incorporate OAuth in Coldfusion for the Eventful API. Hopefully, this article will allow Coldfusion Programmers to buzz through the API when they need to. Basically, what this script does is authori…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

724 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