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

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
Who is Participating?
Renante EnteraConnect With a Mentor Senior PHP DeveloperCommented:

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 :-)
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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.