How to populate DB column with filename from file browse item?

Hi,
Using APEX 3.1.2, I'm trying to easily allow maintenance of a filename stored in a DB column (VARCHAR2(1000)). Using the column as a file browse item seemed to be the way to go, but of course I don't want the resulting file to be uploaded and it appears as though an existing filename is not shown in a form when the row is retrieved.
After much searching, I found Checking filename length in File Browse item before uploading , but I'm not able to connect the dots. I was thinking that I could create a hidden file browse item and use a button to call Javascript function to activate it, then save the resulting filename to my DB column item and wipe out the hidden item before it was uploaded. But the hidden item doesn't appear, so I'm not able to reference it's form input name.
Hopefully this mess makes sense. Anyone?
Thanks!
Rich
Edited by: socpres on Sep 5, 2008 2:02 PM because message was truncated after attempting to preview it first.

Hi John,
From what I can tell, the path of a local file browsed from a file browse item cannot be retrieved because of security concerns. Although, it seems that while Firefox 3 only returns the filename sans directory, IE6 returns the full path:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head><title>Form Test</title>
</head><body>
<script type="text/javascript" language="JavaScript">
function GetDirectory()
strFile = document.FileForm.filename.value;
intPos = strFile.lastIndexOf("\\");
strDirectory = strFile.substring(0, intPos);
alert(strDirectory);
document.FileForm.Directory.value = strDirectory;
</script>
<form id="FileForm" name="FileForm">
<input type="file" id="filename" name="filename" value="" onChange="GetDirectory(this.value)">
<input type="hidden" id="Directory" name="Directory" value="">
</form>
</body>
</html>
This Win-specific code displays the path via IE6, but not in Firefox 3. Then again, I can't seem to preview posts here using FF3, either...
Rich

Similar Messages

  • How to populate an array with random text files.

    I am making a Jeopardy program. I have my program set up so that it retrieves 5 random text files. I just want to know how I populate one array with all the lines from the text files my program is retrieving.

    You can read a textfile line by line and add each line to an ArrayList. An ArrayList is very much like an array only that it's "open ended". You can start adding lines without first knowing how many you're going to get. If you still want an ordinary "static" array when you're finished reading lines you can easily get one from the ArrayList and then drop the ArrayList.

  • Weird problem while Extracting File path from file Browser item

    Hi all
    I followed some tutorials on this forum to get the absolute filepath from the filebrowser item and storing it in the database.
    Heres what I did. I created a script in the header of the page which reads like this:
    <script language="JavaScript1.1" type="text/javascript">
    function SaveFullName(filepath,feed)
    function getVal(item)
    if(document.getElementById(item).value != "")
    return document.getElementById(item).value;
    else
    return "";
    document.getElementById(filepath).VALUE = getVal(feed);
    alert(document.getElementById(filepath).VALUE);
    </script>
    I have call this function by this syntax which I have put in the onchange event handler of the file browser item.
    onChange="javascript:SaveFullName('CCDPATH','CCDFILEBROWSER');"
    Here CCDPATH is the name of the hidden item which I use to store the path and CCDFILEBROWSER is the name of the filebrowser in question.
    now the last statement of the script above, alert(), gives me an alert with the proper value. The problem is when I am trying to store the value of this variable CCDPATH in my database with an onsubmit process, NULL values are getting inserted :-(
    When I checked out in the debug mode, I can see that the value of this hidden item, CCDPATH is showing as "" , i.e; null. Why is this happening is out of my understanding.
    I mean, with the javascript, it is assigning and displaying its value perfectly, but when I try to store it with PLSQL, it simply does'nt happen.
    What am I possible doing wrong? What should I do to store the value of this hidden item in the database ??

    Any thoughts people?

  • How to populate a ComboBox with data from a WebService

    I have a simple application that has a DataGrid that gets its
    data from a web service. I would prefer to put that data into a
    ComboBox instead of a DataGrid. My web service returns objects.
    Anyone have any idea how to do that?
    <mx:DataGrid id="dgProjects"
    dataProvider="{ws.getProjects.lastResult}" >
    .....<mx:columns>
    ..........<mx:DataGridColumn dataField="projectID"
    headerText="Project ID" width="100"/>
    ..........<mx:DataGridColumn headerText="Project Name"
    dataField="projectName"/>
    ..........<mx:DataGridColumn headerText="Doc UNID"
    dataField="docUNID" visible="false"/>
    .....</mx:columns>
    </mx:DataGrid>

    I tried that but it doesn't work. However, I just found part
    of the solution and that was to add labelField="projectName".
    That worked. Now, I want to glue together projectID with
    projectName and a dash between them. So I changed it to labelField
    = "projectID - ProjectName" and that causes the combo box to
    display [Object] [object].
    Any ideas how to glue those items together?

  • How to get full path in file browse item

    Hi
    I have a file item. When I submit the form and store and value in db, then the file path is stored as numbers and appended to the file name. I undestand that this is because of some wwv flow files index or something . How to get the file path? Anybody...

    For security/privacy reasons recent versions of browsers by default do not send local file path information from File Browse items to the server, nor expose the file path in the control's JavaScript methods. Firefox, Safari and Chrome only provide the filename. IE6 & IE7 still yield the path in Windows format. IE8 and Opera have adopted an irritating approach of replacing the path with a wholly imaginary "C:\fakepath\".
    Changes to IE's security config can enable the path to be exposed in IE8, but I don't think it will be available via <tt>apex_application_files</tt>.
    For more information see:
    http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-March/018980.html
    http://blogs.msdn.com/ie/archive/2009/03/20/rtm-platform-changes.aspx

  • How to add custom columns with BO data from GP to UWL

    Hi
    We have CE 7.1 in our project UWL taskitems only have GP workflow tasks.
    In UWL we can see that by default there are standard columns but now we need to add custom columns with data from ours BO associated to process instance
    For that we need to develop one custom connector for UWL where we can retrieve the values from custom conenctor to UWL.
    Currently our NWDS 7.1 does not have plugins for UWL Connector can anybody tell me where can I download this plugins?
    thanks in advance!
    Regards
    Cristian

    Hi,
    plz refer the following link
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f0ee5047-c7a0-2a10-70b7-9557e3e4d440
    Regards
    Manohar

  • How to populate a page with images in across/down direction?

    Hi,
    Does anyone know how to populate a page with images in across and down direction (for example 6 X 6 )? It seems that I cannot use data table because records are only running downward and each row can have one record.
    Any suggestion would be appreciated. thanks.

    Alex,
    You can create your own tabular form using APEX_ITEM API's
    Create report and you can put similar code to following
    SELECT APEX_ITEM.TEXT(1,col1) pk1, APEX_ITEM.TEXT(2,col2) pk2 FROM your_tableSo data will be displayed in TEXT boxes as if it's a tabular form. Now you need to handle INSERT/UPDATE/DELETE processes manually. You can easily handle INSERT and DELETE. But handling UPDATE can be a nightmare. What if user has updated both the column values?
    Updated details
    One way out would be to use ROWID as Primary key to handle DELETE and UPDATE
    SELECT APEX_ITEM.CHECKBOX(1,ROWID) tick, APEX_ITEM.TEXT(2,col1) pk1, APEX_ITEM.TEXT(3,col2) pk2 FROM your_tablebut yet I suggest to go for proper primary key..
    Regards,
    Hari
    Edited by: Hari_639 on Dec 3, 2009 6:52 PM

  • Table - populate one table with data from the list of another table

    Hello All,
    I am a newbie in Swing and am a book and few tutorials old.
    I am trying to achieve the following:
    (1) I populate Table1 (a JTable) with a list of data - each row consists of several columns. And I have a Table2 (also JTable) that is in the beginning empty.
    Both the tables (Table1 and Table2) are showed in the window.
    (2) Lets say, there's a button (JButton) in between the two tables.
    Now if I Select a row from Table1 and press the button, this row will be sent/copied to Table2.
    And this way I can choose different rows and pass the data to Table2.
    I have manages to make Table1 and put data in it ... but for the rest, I don't know where and how to begin.
    Would appreciate some ideas and tips.
    Thank you.

    Since you are using a button to start the copy process you don't need to worry about a ListSelectionListener or a MouseListener. You need to create a button with an ActionListener that does the following:
    a) Create an Array based on the size of the number of columns in the table
    b) get the index of the selected row
    c) populate the Array with data from the TableModel by using the table.getModel().getValueAt(...) method for each
    d) Now you can add the row of data to the other JTable by updating its model.
    DefaultTableModel model2 = (DefaultTableModel)table2.getMode();
    model.addRow( theArray );

  • How can i access filename from file (sender)

    hi All,
    can anybody tell me
    how can i access filename from file (sender)?
    thank u
    swari

    See:
    "SAP NetWeaver XI: Variable Substitution with Adapter-Specific Message Attributes via DynamicConfigurationBean"
    SAP NetWeaver XI: Variable Substitution with Adapter-Specific Message Attributes via DynamicConfigurationBean
    "Accessing Adapter-Specific Attributes through User Defined Function"
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/70c89607-e4d9-2910-7280-f6746e964516

  • How do I transfer columns of statistics from an email or QuarkXpress into Adobe Muse?

    How do I transfer columns of statistics from an email or QuarkXpress into Adobe Muse?

    Well, it really depends on the file format your friends are using to send you the video. iTunes will only play certain formats, think of it as........having a car that only takes premium gasoline. If your friends give you a million gallons of regular gasoline, sure it's gasoline, but it won't work in your car. (That's a bad analogy but it's the best I can come up with).
    So, if you open up your mail (are you using the Mail program on your computer, or going to a website such as gmail.com or yahoo.com to access your mail?), you should be able to right click the video and select to download it.
    This should download it to your "downloads" folder, it should be on your dock if you didn't remove it. Click it, and select the "More in finder" button at the very top of the "stack".  If not, click the "Finder" button on your dock, and on the left click the Downloads tab.
    Now, you must find the video. It should have the name of the video with the extension (an example would be...... firstbirthday.mp4). The extension is the ".mp4" part. Yours may be .mov, .mp4, .mkv, .avi, the list goes on and on, but it's very important.
    You can try dragging the movie into iTunes (drag it anywhere over where it says Music, Movies, TV Shows, etc.) and it should hopefully turn to a little green bubble with +1. If the extension is not compatible, then, converting will be needed and that's a bit more tricky. It's also a little more tricky to get them to play on your Apple TV unless you use AirPlay.
    Let us first know what extension these videos are in and we can go from there.

  • How do you move itunes with playlists from one computer to another

    how do you move itunes with playlists from a computer to ext hard drive, so it will play from the ext harddrive and not the computer

    Type "move itunes library to external hard drive" into the google search bar.

  • How to make text columns with adobe muse

    Hi,How to make text columns with adobe muse (like InDesign)?

    Multiple columns can be acheived with CSS - http://www.w3schools.com/css/css3_multiple_columns.asp
    div
    -moz-column-count:3; /* Firefox */
    -webkit-column-count:3; /* Safari and Chrome */
    column-count:3;
    I'm surprised that Muse does not support text columns yet, but perhaps the custom CSS can be added in style tags on page properties. Haven't tried it, but don't see why it wouldn't work.

  • How to create a interface with NTR from SAP XI?

    How to create a interface with NTR from SAP XI?

    Hi,
        What do you mean by NTR ?...
    What are the details you needed...Please be clear and more elaborative as far as possible..so that you will get straight forward answers...
    HTH
    Rajesh

  • How to integrate USSD Aggregator with JMS from Brand mobiliser

    Please help me to come out of this problem (How to integrate USSD Aggregator with JMS from Brand mobiliser)

    Dear jeevan,
    Step 1: Login into Brand mobiliser
    Step 2: Under Work space Administration configure JMS channel manager.
    Step 3: Use work space outbound channel as JMS.
    Step 4: write JMS api to process inbound and outbound queues.

  • How can i register column with in the query

    hi all
    how can i register column with in the query?

    Thanks.
    In my business one, the column width was registed.
    But I don't know how can I do it.
    So I try to save the query again after change column width.
    Then the query was opend with changed column width.
    Is it right function?
    Is there any way to register the column width?
    It's very troublesome to change column width every time.
    seiichi

Maybe you are looking for

  • Tecra S11: Toshiba Detection Tool: Your product could not be found error

    Hi, I use Toshiba Detection Tool to find drivers quickly for my tecra, but for a month now the page gives this error Your product could not be found It is no problem to select my laptop from the drop down list again and again, but it was comfortable,

  • Iweb photo gallery question

    I have created an Iweb photo gallery on my website, and I wish to add links to each individual photo so that when a person clicks for the full view of the photo a link will appear somewhere on the page. I want each link to be specific to each photo.

  • Has the "reset data and documents" disappeared

    Has the "reset data and documents" disappeared from the advanced settings on icloud.com after signing in?

  • Does AppleTV sync both the HD and SD versions?

    Hi, When you sync AppleTV with iTunes on your MAC does it copy SD versions of a TV shows to AppleTV along with the HD version? My iTunes on my MAC is appears to be showing that the AppleTV has both, but I'm not sure. Cheers.

  • How to disable tab in detail screen in MIGO T.code

    Hi , I want to disable serail number tab in detail tab in MIGO transaction and also want to create same subscreen like Serail number with additional 2 fields. Could some one help me how to disable above mentioneed tab and add new tab to MIGO transact