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!

How to capture a search word? 1

Status
Not open for further replies.

jarla

Programmer
Jan 2, 2001
34
0
0
FI
HI!
I have made a page which uses Canto´s Web Publisher for searching images with keywords from our server. The other software is ColdFusion, which handles for example user informations. So: I must find a way how to track what keywords our customers use when they search pictures. I have made *.cfm -page which can do that, but when it do that, the search will not start. So how can I submit two different actions: Search and that *.cfm -page which saves the search keyword to database?
 
Have u try <cfinclude>? Maybe u can <cfinclude name=&quot;searchpagename.zzz&quot;> in the *.cfm page
 
Rac13's approach should work if the search page is a CF script. If not, I would call the CF page first and then do a <cflocation> to the search page and append any keywords on as url variables. If the search page will only work with the keywords passed in as form variables, just use <cfhttp> with <cfhttpparam> tags for the keywords. After the <cfhttp> tag completes, the search page results will be contained in #cfhttp.filecontent# which you can then show to the user.

This way, your cf script can do what it needs and then pass control to the search page. The <cfhttp> approach is more efficient since the <cflocation> sends back a re-direct to the web browser and makes it request a new page. The <cfhttp> tag will handle everything with one browser request.

GJ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top