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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I got a <cfinclude> tag problem

Status
Not open for further replies.

joannyk

Programmer
Jan 16, 2001
18
HK
Hello everyone!

I have a program called 'vote.cfm' which is a web poll and when people pick an option then click submit button, it'll record the poll and popup another dialog box to display the latest statistic.

Well, everything works fine when this program stand alone. However, when I embed it into another cfm file (index.cfm), using <cfinclude template = 'vote.cfm'>, it doesn't work as usual that after pressing the submit button, no data saved in database and no popup dialog box shown neither. It just stay in the same 'index.cfm' file as if nothing has been done.

I would be really appreciate if any one can give me a clue.
Thx in advance :)

Joan
 
the problem you have is probably related to the template paths;
if the vote.cfm have any custom tags that are called by using cf_customTagName, and you use
cfinclude template=&quot;includes/vote.cfm&quot; to include vote.cfm, then custom tag itself has to be located in the folder where main template is; it is same case with any other include files you might have in the vote.cfm template;

first, check all paths; that will fix your problem here; in the future, try having all your custom tags in the C:\cfusion\CustomTags folder; that way cf server will always find requested tag; Sylvano
dsylvano@hotmail.com
 
I would also display index.cfm and then do a view source on it. Then count the number of <form> and </form> combinations, making sure they're what you expected. I'm guessing that if you're seeing the form itself that the include is working all right, it's just not working when you wrap the other code around it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top