Solved

Appending form value to coldFusion.navigate function

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

Stressed Out?

Watch some penguins on the livecam!

Question has a verified solution.

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

In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
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…

690 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