www.webdeveloper.com
Recent Articles
  • Finding Slow Running Queries in ASE 15
  • A More Advanced Pie Chart for Analysis Services Data
  • Adobe AIR Programming Unleashed: Working with Windows
  • Performance Testing SQL Server 2008's Change Data Capture Functionality
  • The ABC's of PHP: Introduction to PHP
  • How to Migrate from BasicFiles to SecureFiles Storage
  • Why the Twitter Haters Are Wrong
  • User Personalization with PHP: Beginning the Application
  • Whats in an Oracle Schema?
  • Lighting Enhancement in Photoshop
  •  

    Go Back   WebDeveloper.com > Client-Side Development > JavaScript

    JavaScript JavaScript (not Java) Discussion and technical support, including AJAX and frameworks (JQuery, MooTools, Prototype...)

    Reply
     
    Thread Tools Search this Thread Rate Thread Display Modes
      #1  
    Old 09-20-2004, 11:12 PM
    betheball betheball is offline
    Registered User
     
    Join Date: Sep 2003
    Location: Utah
    Posts: 394
    Copy input from text box to hidden field

    I have a form that includes a input type="file" field for upload. Would it be possible in javascript to have the path from the that field be automatically copied to a hidden field? Of course, if the answer is "yes", the next question would be, how?
    Reply With Quote
      #2  
    Old 09-20-2004, 11:44 PM
    javaNoobie javaNoobie is offline
    Java != Javascript
     
    Join Date: Jul 2004
    Location: Singapore, SG
    Posts: 654
    Code:
    <form name="frm" action="">
    <input type="file" name="fileUp1" onchange="this.form.copy1.value=this.value; alert(this.form.copy1.value);">
    <input type="hidden" name="copy1">
    </form>
    Use the onchange event handler to copy the value to the hidden field
    Reply With Quote
      #3  
    Old 09-20-2004, 11:58 PM
    betheball betheball is offline
    Registered User
     
    Join Date: Sep 2003
    Location: Utah
    Posts: 394
    Absolutely perfect. Thanks!
    Reply With Quote
    Reply

    Bookmarks


    Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
     
    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes Rate This Thread
    Rate This Thread:

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is Off
    HTML code is Off
    Forum Jump


    All times are GMT -5. The time now is 12:11 AM.



    Acceptable Use Policy

    internet.comMediabistrojusttechjobs.comGraphics.com

    WebMediaBrands Corporate Info


    Advertise | Newsletters | Feedback | Submit News

    Legal Notices | Licensing | Permissions | Privacy Policy

    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.