Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating site from asp to ColdFusion. 1

Status
Not open for further replies.

JanetB

Programmer
Oct 10, 2002
9
0
0
US
webmigit,
Thank you for assisting me with my last problem. I thought I might take advantage of your insight once more. As I had mentioned, I am changing my companies web site from asp to CF at their request. Mostly this process is going quite well. I have run into one other "wall" though. I am trying to make it so our Customer Support personnel can flip from one new online order to the next.

asp cods is:
<a href=&quot;/NewOnlineOrdersEnterNumber.asp?oid=<%=(oid+1)%>&quot;>NEXT</a>

my CF code is:
<a href=&quot;/NewOnlineOrdersEnterNumber.cfm?oid=#oid#+1&quot;>NEXT</a>

My CF code results in the next oid(OrderID) being 1. The new oid's are incremented by one. So adding 1 to the last oid should give the next oid. But the #oid# is ignored and only the 1 is processed. I have tried parenthesis and quotes around the #oid#+1 with non-acceptable results. I have only been a programmer for 6 months now and just can't seem to get this one to work. Any assistance would be appreciated.
 
Try
<cfset variables.nextOID = oid + 1 />
<a href=&quot;/NewOnlineOrdersEnterNumber.cfm?oid=#variables.nextOID#&quot;>NEXT</a>

-----------------------------------------------------------
brannonH
if(!succeed)try(); ----------------------------------------brannonH
if( !succeed ) { try( ); }
 
<a href=&quot;/NewOnlineOrdersEnterNumber.cfm?oid=#evaluate(oid+1)#&quot;>NEXT</a> ALFII.com
---------------------
If this post answered or helped to answer your question, please reply with such so that forum members with a similar question will know to use this advice.
 
Hi JanetB,

This is probably a silly question, but did you make sure that your variable output in your link is inside of a <cfoutput></cfoutput> ?


<cfset oid = 1 >
<a href=&quot;/NewOnlineOrdersEnterNumber.cfm?oid=<cfoutput>#evaluate(oid+1)#</cfoutput>&quot;>NEXT</a>
 
guitboxgeek,
Thank you, I had not put my variable output inside the output tags. This is exactly the hint I needed. Program works great now. Again, thank you.
 
guitboxgeek,
Good afternoon, and again thank you for your assistance. I am very new to programming. I went from Customer Support Management to Lead Programmer, Web Developer/Designer, and IT support for our building only 6 months ago. I have never worked in this field prior to this position. I am just now learning about servers, databases and this very interesting ColdFusion. So things arn't obvious to me yet. Things are quite new and learned as I go. I have been assigned the task of having our companies new Web Site up and fully functioning by June 2003. It is difficult to look up help in the many books I have. If you don't know what something is called it is nearly impossible to look it up. It is like looking for a needle in a hay stack when you do not know what a needle looks like. I have just found this wonderful site and am greatful for it and the knowledgable people who visit it. I can't wait until things are obvious to me instead of a constant struggle surrounded by vigirous research. Thank you for solving one of my headaches. Have a good day.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top