?
Solved

multiple cfinvokes and one url variable

Posted on 2004-04-26
6
Medium Priority
?
429 Views
Last Modified: 2013-12-24
in the below the first cfinvoke returns variable 'anOID'

how do i reference this as an arguemnt passed to the next cfinvoke?

also , did i correctly reference the URL id?

<cfif isDefined("url.addProdID")>
<cfinvoke component="api/cartservice" method="newCart" >
</cfinvoke>
<cfinvoke component="api/cartservice" method="addCartItem" >
<cfinvokeargument name="cartoid" value="anOID">
<cfinvokeargument name="itemoid" value="url.addProdID">
<cfinvokeargument name="quantity" value="1">
</cfinvoke>
</cfif>
0
Comment
Question by:finnstone
[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
  • 4
6 Comments
 
LVL 17

Assisted Solution

by:Tacobell777
Tacobell777 earned 1000 total points
ID: 10924521
<cfinvokeargument name="itemoid" value="url.addProdID"> should be <cfinvokeargument name="itemoid" value="#url.addProdID#">
Not sure what your after with your first question?
0
 

Author Comment

by:finnstone
ID: 10924537
well the newCart method returns a variable using cfreturn calling anOID, i was wondering how i can refer to it now that it has been returned?

do i need #s
0
 
LVL 18

Accepted Solution

by:
Plucka earned 1000 total points
ID: 10924538
Hi finnstone,

On your first <cfinvoke specify the returnvariable

<cfinvoke component="api/cartservice" method="newCart" returnvariable="anOID">

On your call use that variable.

<cfinvokeargument name="cartoid" value="#anOID#">

Did you know you can do this.

<cfinvoke component="api/cartservice" method="addCartItem" cartoid="#anOID#" itemoid="#url.addProdID#" quantity="1">

All on one line.

Regards
Plucka
0
Supports up to 4K resolution!

The VS192 2-Port 4K DisplayPort Splitter is perfect for anyone who needs to send one source of DisplayPort high definition video to two or four DisplayPort displays. The VS192 can split and also expand DisplayPort audio/video signal on two or four DisplayPort monitors.

 

Author Comment

by:finnstone
ID: 10924544
thx guys
0
 

Author Comment

by:finnstone
ID: 10924743
i got this error that anOID is undefined


Variable ANOID is undefined.

The error occurred in line 13

 
11 : </cfinvoke>
12 : <cfinvoke component="htmlcartservice" method="addCartItem" >
13 : <cfinvokeargument name="cartoid" value="#anOID#">
14 : <cfinvokeargument name="itemoid" value="#url.addProdID#">
15 : <cfinvokeargument name="quantity" value="1">

 
0
 

Author Comment

by:finnstone
ID: 10924818
never mind i got it heres the whole thing



<cfif isDefined("url.addProdID")>
<cfinvoke component="htmlcartservice" method="newCart" returnvariable="anOID" >
</cfinvoke>
<cfinvoke component="htmlcartservice" method="addCartItem" >
<cfinvokeargument name="cartoid" value="#anOID#">
<cfinvokeargument name="itemoid" value="#url.addProdID#">
<cfinvokeargument name="quantity" value="1">
</cfinvoke>
</cfif>
0

Featured Post

10 Questions to Ask when Buying Backup Software

Choosing the right backup solution for your organization can be a daunting task. To make the selection process easier, ask solution providers these 10 key questions.

Question has a verified solution.

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

This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

770 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