Solved

Could u pls tell me the right syntex?

Posted on 2000-02-17
3
125 Views
Last Modified: 2013-12-24
I have a form with some fields. Now I want to store all the fields data to be store in a single variable. What I have done is patesd below:

<!-- Form.html -->

<form name="data" action="FormAction.cfm" method="Post">
      Name : <input type="Text" name="Name"> <br>
      Phone : <input type="Text" name="PhoneNo"> <br>
      <input type="Submit" name="Submit"> <br>
</form>

<!-- FormAction.cfm -->

<cfoutput>
      <cfset Data=
      <cfif isDefined("Form.Name")>"#Name# </cfif>
      <cfif isDefined("Form.PhoneNo")>#PhoneNo# </cfif> >
</cfoutput>

<cfoutput>
      #Data#
</cfoutput>

I am getting following error:
~~~~~~~~~
Error Occurred While Processing Request
Error Diagnostic Information
Just in time compilation error

Invalid token found on line 5 at position 2. Cold Fusion was looking at the following text:

<c
The last successfully parsed CFML construct was a CFSET tag occupying document position (4:2) to (4:7).

The specific sequence of files included or processed is:
C:\WEBSHARE\WWWROOT\training\FormAction.cfm      


Date/Time: 02/18/00 11:24:59
Browser: Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)
Remote Address: 127.0.0.1
HTTP Referer: http://127.0.0.1/training/temp.htm
Template: C:\WEBSHARE\WWWROOT\training\FormAction.cfm
~~~~~~~

Can anybody help me out of this problem?

RAjesh

0
Comment
Question by:rkchopra
  • 2
3 Comments
 
LVL 4

Accepted Solution

by:
FRehman earned 100 total points
ID: 2534310
<cfoutput>
<cfset Data=
<cfif isDefined("Form.Name")>'#form.Name#' </cfif>
<cfif isDefined("Form.PhoneNo")>#PhoneNo# </cfif> >
</cfoutput>
check this you put extra " after fist if condition
0
 
LVL 4

Expert Comment

by:FRehman
ID: 2534345
try this I check it it work fine
<cfoutput>
<cfset data="">
<cfif isDefined("Form.Name")>
<cfset data=listappend(data,"dsfsd")>
 </cfif>
 <cfif isDefined("Form.Phone")>
 <cfset data=listappend(data,'#form.phone#')>
 </cfif>
</cfoutput>
<cfoutput>#data#</cfoutput>
0
 

Author Comment

by:rkchopra
ID: 2534608
The second once works fine. Thankyou very much. I am giving you 100 no.

Regards,
RAjesh
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

759 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

20 Experts available now in Live!

Get 1:1 Help Now