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

Posted on 2005-05-16
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

    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

    Hi VHSB!

    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 :-)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
    Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    794 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

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now