Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 676155
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T00:53:49+00:00 2026-05-14T00:53:49+00:00

I have an upload box… <form action=upload_file.php method=post enctype=multipart/form-data><BR> <label for=file>Filename:</label><BR> <input type=file name=file

  • 0

I have an upload box…

<form action="upload_file.php" method="post" enctype="multipart/form-data"><BR>
    <label for="file">Filename:</label><BR>
    <input type="file" name="file" id="file" /><BR> 
    <input type="submit" name="submit" value="Submit" />
</form>

Now when I click browse and get the Image I want to upload and click it, it shows the path of the file into the text box that comes with. Now I want to get that path and insert it into a <img> tag so It will show to get a preview before I upload.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T00:53:50+00:00Added an answer on May 14, 2026 at 12:53 am

    Try this:

    <script>
    function lalala(str){
        alert(str);
    }
    </script>
    
    <form action="" method="post" enctype="multipart/form-data" name="form1" id="form1">
    
    <input type="file" name="file" id="file" onchange="lalala(this.value);" />
    </form>
    

    It worked for me in IE8 it gives me the complete path but in firefox and chrome is just prints the file name 🙁

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a popup with a form containing file upload cfgfile <form id=mainForm method=post
I have an upload form with a file to be uploaded. The issue I
I have a file upload form that is being posted back to a servlet
I have an file upload box and a clear button on my page. When
I have a form with series of 3 file upload fields, each of which
I have a form that allows users to upload text AND a file. However,
When posting a form with a file upload box using document.forms[0].submit() on ie 9
I have a upload text file field, and with it I plan to save
I have an upload script that write a index.html file, I modified it to
So I have an upload script, and I want to check the file type

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.