Solved

Appending form value to coldFusion.navigate function

Posted on 2009-05-20
2
369 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Today, I was working on some optimization and spam-stopping techniques when I encountered Ben Nadel's post to reduce spam feature using Math (http://www.bennadel.com/blog/197-How-I-Stop-Spammers-On-My-ColdFusion-Blog.htm). While this method is not o…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
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…

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

11 Experts available now in Live!

Get 1:1 Help Now