Getting complete file path in Acro Java Script

Hi All,
I have a requirement where I have a field ZPATH1 on Adobe Interactive Form. I am putting a BROWSE button and writing following JavaScript on CLICK event on this button for populating the chosen file path into field ZPATH1.
*Start of JavaScript
var sFile;
event.target.importDataObject(sFile);
var oFile;
oFile = event.target.getDataObject(sFile);
this.parent.parent.Sub_Form_Fields_Mass.ZPATH1.rawValue = oFile.path;
*End of JavaScript
1. event.target.importDataObject(sFile) --> Giving me the pop up to select the file.
2. this.parent.parent.Sub_Form_Fields_Mass.ZPATH1.rawValue = oFile.path; --> Putting the oFile path in field ZPATH1 on the form.
3. This way is only giving me the selected FILE NAME whereas I need the complete path.
I have tried below way also:
this.parent.parent.Sub_Form_Fields_Mass.ZPATH1.rawValue = even.target.path;
This function returns me the complete path but in URL form. It does not give me the presentation server path.
Please suggest me how to get the complete path of presentation server to the file.
Appreciation would be honored in form of points!!!
Regards,
Ashish

I don't recognize the tech - is it something related to BusinessObjects Enterprise?
Sincerely,
Ted Ueda

Similar Messages

  • Getting complete file path in Adobe Interactive Form

    Hi All,
    I have a requirement where I have a field ZPATH1 on Adobe Interactive Form. I am putting a BROWSE button and writing following JavaScript on CLICK event on this button for populating the chosen file path into field ZPATH1.
    *Start of JavaScript
    var sFile;
    event.target.importDataObject(sFile);
    var oFile;
    oFile = event.target.getDataObject(sFile);
    this.parent.parent.Sub_Form_Fields_Mass.ZPATH1.rawValue = oFile.path;
    *End of JavaScript
    1. event.target.importDataObject(sFile) --> Giving me the pop up to select the file.
    2. this.parent.parent.Sub_Form_Fields_Mass.ZPATH1.rawValue = oFile.path; --> Putting the oFile path in field ZPATH1 on the form.
    3. This way is only giving me the selected FILE NAME whereas I need the complete path.
    I have tried below way also:
    this.parent.parent.Sub_Form_Fields_Mass.ZPATH1.rawValue = even.target.path;
    This function returns me the complete path but in URL form. It does not give me the presentation server path.
    Please suggest me how to get the complete path of presentation server to the file.
    Appreciation would be honored in form of points!!!
    Regards,
    Ashish

    please post it here for quick response
    and also search in adobe forums also for java script related.
    http://www.adobe.com/support/forums/index.html

  • Getting the file path from a File browse button

    Hi,
    I was wondering if there is a way to extract the whole file path (not just the file name) from a file which is selected using a file browse button?
    I am trying to save the file path as text in my database (I don't want to upload the file). I have linked the file browse object to a table field in the database. But when entered in the database, all I get is a series of random characters, followed by the file name. I would like to have the complete file path instead.
    Tom

    Hi thanks
    I've placed the java script into the head of the page, but unsure as to how to change the taget url for my submit button from doSubmit('SUBMIT') to doPrepareAndSubmit('SUBMIT'). In fact I don't actually have a submit button, but a save new record (which performs an SQL INSERT into the database using the values contained in the fields on the page) or a update record buttons instead.
    I'm sorry but my knowledge of java scripts is not very good either.
    How do I do the follwoing?: if your submit button has not any target set its target to url:
    javascript: doPrepareAndSubmit('SUBMIT')
    Cheers, Tom

  • How to get the file path in adf application

    hii all,
    i have a txt file that i am using in my adf application,
    i am passing this txt file through a File Reader, for which i have to mention the file path.
    The file is in web-content and when i am hard coding the complete file path i.e C:/JDeveloper/myApp/ViewController/public_html/log.txt
    the application is working fine when run on integrated weblogic server.
    My requirement is to access this file without giving the static file path, as in case i have to use this application on any other machine..
    for that how to mention the file path-
    i tried using FacesContext to get the context path :-
    FacesContext.getCurrentInstance().getExternalContext().getRequestContextPath();
    which gives me
    \myApp-ViewController-context-root
    after appending public_html\log.txt
    I am using the following path to access the file :-
    \myApp-ViewController-context-root\public_html\log.txt
    again i am getting the java.io.FileNotFoundException
    Does anyone know how to use file from inside the web-content without giving the complete path..???
    Thanks

    Hi,
    If you put your file under public_html folder, you can use this code to access the file:
    For example file is : log.txt
    FacesContext.getCurrentInstance().getExternalContext().getRealPath('/log.txt').toString().trim();
    Thanks.
    - LSR

  • How to get physical file path from logical file path

    Hi
    there is a immediate requirement ,
    I have logical file path but I need to get physical file path from it.
    So is there any FM which providesthis functionality.
    Points will be rewarded.
    Thanks

    Can you please share the piece of code ?
    Which File APIs are you using ?
    For java file, you can get complete path by simple method call : getAbsolutePath() on file object.
    Regards,
    Ashwani Kr Sharma

  • How to get absolute File Path using JFileChooser?

    Hi,
    IS there any way by which we can get the absolute file path ? e.g. If I browse thro JFileUser and Selects "a.txt" and say open, it should return me the complete file
    path e.g. D:/abc/a.txt.
    Present method.fileChooser.getSelectedFile().getName() return the name of the file i.e. a.txt and NOT the complete path.
    Pls Help !!

    fileChooser.getSelectedFile().getAbsolutePath(); will do the trick.

  • Getting the File Path of file attached to Document(CV03N)

    Hi,
    We are migrating DOCUMENTS(Document Info Record)data from SAP 3.1i Version to SAP ECC6.0 Version. Here i want to transfer file path of file attached in 3.1i(From DRAW-FILEP) but, i can not able to find complete path of that particular file in FILEP field, it holds only the file name.
    Please help me getting that complete file path.
    JMP

    Hi Maruthi,
    If you want access or see the file name in the document you need to supply three fields.
    FILEP, DTTRG, DAPPL in DRAW table.
    I have used the LSMW with IDOC method and assigned the fields DOCFILE1, DATACARRIER1 and WSAPPLICATION1.
    Thanks,
    Satheesh

  • How Do I get a File Path from a FileName?

    Hi there,
    I was wondering how do i get a file path(i.e) directory only from a file name.
    Say i got a file called "C:\Test.txt" is there a method in java that will allow me to only get "C:\"?
    I've tried getPath(), getAbsolutePath() and they all return the directory and the file itself.
    Please Help
    James

    String path = file.getPath();
    String name = file.getName();
    int i=0;
    for(i=0; i< (path.length()-name.lenth() ); i++){
    String temp = path.substring(i, i+name.length());
    if(temp.equals(name) break;
    return path.substring(0,i);

  • How to get the file path from HTML input form in Firefox3

    In IE7 (and probably all famous browsers, including old Firefox 2), if we submit a file like 'C:\folder1\folder2\folder3\filename' it works properly and gives the full path to the file and the filename.
    In Firefox 3, it returns only 'filename', because of their new 'security feature' to truncate the path, as explained in Firefox bug tracking system (https://bugzilla.mozilla.org/show_bug.cgi?id=143220)
    I have no clue how to overcome this 'new feature'.
    Can anyone help to find a single solution to get the file path both on Firefox 3 and IE7?
    Thanks in advance....

    Doubleposted and ignored any previous answer: [http://forums.sun.com/thread.jspa?threadID=5342405]. Don't do that. It's rude.
    Regarding to your "problem": why do you need the file path?

  • How to get the file path from HTML input form in Firefox 3...

    In IE7 (and probably all famous browsers, including old Firefox 2), if we submit a file like 'C:\folder1\folder2\folder3\filename' it works properly and gives the full path to the file and the filename.
    In Firefox 3, it returns only 'filename', because of their new 'security feature' to truncate the path, as explained in Firefox bug tracking system (https://bugzilla.mozilla.org/show_bug.cgi?id=143220)
    I have no clue how to overcome this 'new feature' because it causes all upload forms in my webapp to stop working on Firefox 3.
    Can anyone help to find a single solution to get the file path both on Firefox 3 and IE7?
    Thanks in advance....

    As you're posting this in the JSF forum and looking at your [previous topic|http://forums.sun.com/thread.jspa?threadID=5342365], I assume that you're using Tomahawk's t:inputFileUpload. In this case, just use UploadedFile#getInputStream(). You may find this article useful: [http://balusc.blogspot.com/2008/02/uploading-files-with-jsf.html].
    By the way, are you lazy or just dumb? You wasted one week to this! I've posted the aforementioned article one week ago. How did you stuck?

  • Function module to get the file path in the system for TEMP folder

    Hi All,
    Is there any function module that I can use to get the file path in the system for TEMP folder.
    I mean, i am supposed to give only TEMP as the input for that function module and I need to get the path of that in the system as the output.
    I am unsing 4.0 version.
    Please advice.
    Regards
    Ramesh

    In Higher versions, we can use the below code:
    call method CL_GUI_FRONTEND_SERVICES=>ENVIRONMENT_GET_VARIABLE
        exporting
          VARIABLE   = 'TEMP'
        importing
          VALUE      = LV_TMP
        exceptions
          CNTL_ERROR = 1
          others     = 2.
      if SY-SUBRC <> 0.
        message id SY-MSGID type SY-MSGTY number SY-MSGNO
        with SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
      call method CL_GUI_CFW=>FLUSH
        exceptions
          CNTL_SYSTEM_ERROR = 1
          CNTL_ERROR        = 2
          others            = 3.
      if SY-SUBRC <> 0.
    Error handling
      endif.
      concatenate lv_tmp '\' into folder_path.
    But need to know in the lower versions like 3.1h and 4.0,

  • How to get full file path while uploading a file in flex Applications

    How to get full file path while uploading a file in flex applications.
    FileReference Object is giving file name and other details but not the actual path.
    Is there any workaround to to get the file path?.
    Thanks

    Why not ask in the Flex forum; it is more likely that someone over there knows.

  • Open Recent - CS3 Complete File Path

    In CS2 my open recent files showed the complete file path. e.g. d:\jobs\clients name\file name.indd.
    In CS3 it only shows file name without the complete path.
    Is there a setting to change this or am I stuck with it?

    CS3 will show the complete path if it is necessary to eliminate ambiguity.
    Dave

  • Getting complete full path of a file name

    Greetings Java developer!
    I am having a problem in my JSF program to get a complete full path of a file name if I runs it using a browser other than IE.
    Here is the code I used to retrieve the complete full path of a fine name in my program.
    UploadedFile uploadedFile =
    fileUpload1.getUploadedFile();
    String uploadedFileName =
    uploadedFile.getOriginalName();
    note: fileUpload1 is a UI component of sun.rave.web.ui.model.
    The expected result would be i.e.:
    C:\\abc\file.txt or /abc/file.txt
    It works in the IE browser, but does NOT in Mozilla, Firefox, and Netscape. Is anyone have a clue to resolve this problem? Please advice.
    Thanks!
    jsfNewbie
    Message was edited by:
    jsfNewbie

    Hi,
    The tutorial on file upload
    http://developers.sun.com/jscreator/learning/tutorials/2/file_upload.html
    has been updated to include this information. Pasting the relevant code from the tutorial:
    public String uploadFileButton_action() {
    UploadedFile uploadedFile = fileUpload1.getUploadedFile();
    String uploadedFileName = uploadedFile.getOriginalName();
    // Some browsers return complete path name, some don't
    // Make sure we only have the file name
    // First, try forward slash
    int index = uploadedFileName.lastIndexOf('/');
    String justFileName;
    if ( index >= 0) {
    justFileName = uploadedFileName.substring( index + 1 );
    } else {
    // Try backslash
    index = uploadedFileName.lastIndexOf('\\');
    if (index >= 0) {
    justFileName = uploadedFileName.substring( index + 1 );
    } else {
    // No forward or back slashes
    justFileName = uploadedFileName;
    }

  • I'm trying to download Firefox 4 onto Windows 7 platform. I keep getting an error message that says Java script has an error in Chrome ? Unable to complete download. Constant ahngs & freezes

    I am running on Windows 7 platform. I tired to download the latest Firefox 4 release. Each time, I get the message that "there is an error on line 20 in Java script Chrome that is preventing the download from continuing. I've run Fox in safe mode & still get the same message.

    Your More system details list shows that you use Firefox 4:
    *Mozilla/5.0 (Windows NT 6.1; rv:2.0) Gecko/20100101 Firefox/4.0
    Are you trying to (re)install Firefox 4 or do you get that error if you start Firefox?
    Do a clean (re-)install:
    * Download a fresh Firefox copy and save the file to the desktop.
    * Firefox 4.0: http://www.mozilla.com/firefox/all.html
    * Uninstall your current Firefox version and remove the Firefox program folder before installing that copy of the Firefox installer.
    * Don't remove personal data if you uninstall the current version.
    * It is important to delete the Firefox program folder to remove all the files and make sure that there are no problems with files that were leftover after uninstalling.
    Your bookmarks and other profile data are stored elsewhere (not in the Firefox program folder) and won't be affected by a reinstall, but make sure that you do not select to remove personal data if you uninstall Firefox.
    If that still doesn't work then create a new profile as well.
    See [[Basic Troubleshooting#Make_a_new_profile|Basic Troubleshooting&#58; Make a new profile]]
    If that new profile works then you can transfer some files from the old profile to that new profile (be careful not to copy corrupted files)
    * http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox

Maybe you are looking for

  • Why can iTunes NOT FIND songs on an EXTERNAL DRIVE

    I've read many posts regarding the use of external drives for iTunes data storage. Here's my situation: I've just restored my computer to it's factory settings, then installed iTunes 9.2.1.5 My iTunes consists of songs only and they reside on an exte

  • Uninstalling Leopard on my 2nd Hard Drive

    I own a Power PC dual G5 with 2 250GB hard drives installed. When I installed Leopard, somehow it got installed on my HD2 instead of HD1 where Tiger was primarily installed. The problem is HD2 was just being used as storage and none of my softwares o

  • Why does my Pdf convert into hieroglyphs in Word?

    Is it perhaps encrypted?

  • Export single fields

    Hi all, I'm trying to figure out if it's possible to export specific fields (but not necessarily all fields) from an editable PDF form (made in Acrobat X Standard) to specific cells in Excel? (Excel 2010 version) Some guidance on how to do it would b

  • Photomerge in Photoshop Elements 12

    When I open "New" from the "File" in the menu I have only one option "Blank File" Should I have the option to import the files I want to merge? Can I correct this situation? Faust041