Solved

Appending form value to coldFusion.navigate function

Posted on 2009-05-20
2
377 Views
Last Modified: 2013-11-11
Hi All,
Could do with some help, I need to post a form value either via the URL as I attempted or some how make it available on the next page upon clicking on the link. If anyone can help

Thanks in advance

<a href="viewcart" onClick="javaScript:ColdFusion.navigate('checkout.cfm?vDate=document.vDate.selectdate.value','productlistDiv');return false;" title="Checkout Cart"><img src="img/butCheckoutCart.jpg" alt="Checkout Cart" border="0" /></a

Open in new window

0
Comment
Question by:pigmentarts
2 Comments
 
LVL 27

Accepted Solution

by:
azadisaryev earned 500 total points
ID: 24430440
1) no need to specify 'javascript:' in onclick event - it expects a js function by default, and ColdFusion.navigate IS a js function.
2) you should put a valid link or named anchor in the HREF attribute of your link instead of your 'viewcart', which is neither.
3) to add js to a parameter of ColdFusion.navigate finction, you need to put it OUTSIDE the quotation marks:
ColdFusion.navigate('checkout.cfm?vDate='+document.vDate.selectdate.value,'productlistDiv')

so, your link should look like this:

<a href="#viewcart" onClick="ColdFusion.navigate('checkout.cfm?vDate='+document.vDate.selectdate.value,'productlistDiv');return false;" title="Checkout Cart"><img src="img/butCheckoutCart.jpg" alt="Checkout Cart" border="0" /></a>

Azadi
0
 
LVL 12

Author Comment

by:pigmentarts
ID: 24430565
Thanks Azadi works like a charm.

Regards
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Javasctipt 2 25
Web forms being filled out by bots 4 34
jquery datepciker end date add 6 days 6 36
jQuery - following an example but can I save data server side? 20 50
Recently while working on a project I got a very annoying cfdocument has no body error message. I had never seen this error before. So I checked the code. The code was pretty simple; it was Just showing me the cfdocumnt tag and inside that tag a …
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

773 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