Executing a file ON SUBMIT - displaying the results in a table

Posted on 2005-05-16
Medium Priority
Last Modified: 2013-12-24
Its late in the evening and I want to ask a simple question but I need a quick answer.
I need a form or somesort of interface that contains a submit button. When the button is selected it executes a CF file, the file runs a parse and i need those results to be displayed on a table on the interface when the file has run.

Thanks in advance
Question by:VHSB
LVL 35

Expert Comment

ID: 14014811
Is there a reason you can't do this:

User hits submit
Page does a cflocation to CF file to run.  That page takes care of posting the results.
LVL 14

Accepted Solution

Renante Entera earned 2000 total points
ID: 14015692

Take a look at this simple example :

:: Main Form ::
<form name="form1" action="actionpage.cfm" method="post" enctype="multipart/form-data">
  <input type="file" name="filename"><br>
  <input type="submit" name="submit" value="Submit">

:: Action Page ::
<cfif IsDefined('form.submit') and trim(form.filename) neq ''>
  <cffile action="read" file="#form.filename#" variable="theContent">
  <table border="1">
    <cfloop index="i" list="#theContent#" delimiters="#chr(13)#">
        <cfloop index="x" list="#i#" delimiters="#chr(9)#">

* Reminder : Take note that delimiters will vary depending on the format of the file being processed.

If you need some explanations then just let me know.

Hope this helps you.  Just try it.

eNTRANCE2002 :-)

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a guide to setting up a new WHM/cPanel Server to be used for web hosting accounts. It is intended for web hosting company administrators and dedicated server owners. For under $99 per month (considering normal rate of Big Data Cetnters like …
In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses
Course of the Month15 days, 13 hours left to enroll

850 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