473,396 Members | 1,966 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Errors in cfsearch with Verity code taken from Adobe site docs

48
cf search using verity for my web site. I actually took the code from docs on teh web and tweeked a couple things out on it. Now it is throwing errors and I can't figure out why. What is funny is what is throwing errors was taken strait from the adobe web site docs., so here is my code, I will show you the code I use to index the verity collection, and then the result page.

Indexing code:
Expand|Select|Wrap|Line Numbers
  1. <cfflush>
  2.  
  3. <cfquery name="getresults" dataSource="#APPLICATION.dataSource#">
  4. SELECT Content.Body, Content.title, Content.page, Content.ContentID
  5. FROM Content
  6. </cfquery>
  7.  
  8.  
  9. <span class="style1"> Indexing data ...</span><br>
  10. <cfflush>
  11.  
  12. <cfindex action="refresh"
  13. collection="pdsSite"
  14. key="ContentID"
  15. type="custom"
  16. title="title"
  17. query="getresults"
  18. body="title,Body,page">
  19.  
  20. Result page:
  21.  
  22. <cfsearch name="GetResults"
  23. collection="pdsSite"
  24. criteria="#FORM.criteria#">
  25. <head>
  26. </head>
  27. <body>
  28. <cfform action="result.cfm" method="post">
  29.  
  30. <cfinput type="text" name="criteria" value="#FORM.criteria#" message="Please enter your key word to search." validateat="onSubmit" validate="noblanks" required="yes" id="criteria" size="30" class="main_Inputs">
  31.  
  32. <cfinput type="submit" value="Search">
  33. </cfform>
  34.  
  35. <cfoutput>
  36. Search Results:#FORM.criteria#
  37. </cfoutput>
  38.  
  39. <cfif GetResults.RecordCount is 0>
  40. No files found for specified search, please try a new search.
  41. <cfelse>
  42. <cfoutput query="GetResults">
  43. <cfset bgcolor=IIf(CurrentRow Mod 2,
  44. DE('ffffff'),
  45. DE('ffffcf'))>
  46. #CurrentRow#
  47. <cfset FileName=GetFileFromPath(Key)>
  48. <cfset Ext=ListLast(FileName, ".")>
  49. <cfif Trim(Title) IS "">
  50. <cfset display=GetFileFromPath(Key)>
  51. <cfelse>
  52. <cfset display=title>
  53. </cfif>
  54. <a href="#page#" class="subNav">#display#</a> <span class="style8">(#score#)</span> <br>
  55. <span class="style8"><small>#body#</small></span>
  56. </cfoutput>
  57. </cfif>
  58.  
Now here is the first error. (there are a couple, but lets do them one at a time.)

Error message:

Attribute validation error for tag CFINPUT.
The tag requires the attribute(s): NAME.

The error occurred in C:\Websites\result.cfm: line 81

Expand|Select|Wrap|Line Numbers
  1. 79 : <td class="style8">Search:</td>
  2. 80 : <td><cfinput type="text" name="criteria" value="#FORM.criteria#" message="Please enter your key word to search." validateat="onSubmit" validate="noblanks" required="yes" id="criteria" size="30" class="main_Inputs"></td>
  3. 81 : <td><cfinput type="submit" value="Search"></td>
  4. 82 : </tr>
  5. 83 : </table>
  6.  
I do this kind of stuff all the tie with form fields, and now anything I do to fix it, it throws this error. What am I doing wrong here to place what you used for search critera on a search box in some other place on the site into this search box?

Error 2:
Then my next error is that page is not defined, that is where my link is set up for you to click on the record that gave you results. I can get that error after I fix the search critera error
Jun 5 '08 #1

✓ answered by acoder

The error is pretty self-explanatory. Just add a name attribute to the cfinput submit button.

3 2967
acoder
16,027 Expert Mod 8TB
The error is pretty self-explanatory. Just add a name attribute to the cfinput submit button.
Jun 5 '08 #2
CF FAN
48
oHHHHHHHHHHHH Thanks a lot
Jun 7 '08 #3
acoder
16,027 Expert Mod 8TB
You're welcome :)
Jun 7 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Arjan van Krimpen | last post by:
Hi, Has anyone any experience with the use of Verity (K2) API and PHP? Thanks in advance, Arjan
89
by: Radioactive Man | last post by:
In python 2.3 (IDLE 1.0.3) running under windows 95, I get the following types of errors whenever I do simple arithmetic: 1st example: >>> 12.10 + 8.30 20.399999999999999 >>> 1.1 - 0.2...
0
by: Carolyn Russell | last post by:
Hi: I am hoping someone in this forum can help me - I am trying to find people for my company who have detailed knowledge of the Verity K2 search software product set, including software...
8
by: jon morgan | last post by:
OK, I'm going to be brave. There is a bug in VS.Net 1.1 that causes random compiler errors. I have raised this issue in posts at least three time in the past couple of months without attracting...
78
by: Robert Baer | last post by:
The homepage i have had up and seemingly working is: http://oil4lessllc.com/ However, the validator has so many complaints, and being so incompetent, i have no clue as to how to fix it all. Would...
10
by: yawnmoth | last post by:
I have two servers that have had PHP installed on them and... <?php echo 'hello, world! ?> ....displays a parse error on server A and doesn't display anything on server B. Any ideas as to...
2
by: =?Utf-8?B?UXVpY2s=?= | last post by:
I manage computers for my company and I downloaded SP3 on two systems the other day. Today both of the systems that I have loaded SP3 on have printing issues. I cannot print out of Adobe,...
1
by: CrazeUK | last post by:
Hi All. Now i am relatively new to CF. I have added the verity search function to my website. And it works fine. With a little bit of tweaking, it looks proffesional and holistic. My problem...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.