How to reference workspace image in static file?

I have created a .js file and loaded it into shared components as a static file.
It works great.....EXCEPT.....my images referenced in the code do not show up.
My images are located as #WORKSPACE_IMAGES#. My code for referencing them is:
document.getElementById("box").style.background="url('#WORKSPACE_IMAGES#Page_1.jpg')";
When I put the javascript in the <head> of apex, it can find the images just fine using the above code. But, when I try this code in an external .js file, it can't find the images.
Can anyone help me with understanding this and provide the code that I need to get my images to show up?
Thanks much in advance,
Maggie

Well, that was weird. I put your code in a file with the same name that I had before and then uploaded the new file with your code and ran the application.
The darn thing did exactly what it did before, even with only your code in the .js file. How did it make a connection to the old .js file content? It wasn't in the .js file anymore.
Anyhow. I created a new external .js file with your code and uploaded it. And when I ran the application this is the message that I got.
(drats I can't paste a picture of my message, will have to type it out for you)
Image Url=wwv_flow_file_mgr.get_file?p_security_group_id=9563021284216398&p_fname=Page1.jpg

Similar Messages

  • APEX 3.1 - Cache of Workspace Images or Static Files

    Hi,
    I attended the ODTUG Conference and they mentioned that in 3.1 Images and Static files (uploaded as shared components) are now cached. Where in the documentation does it state this? Can you configure the cache settings?
    Thank you,
    Martin

    Hi Joel,
    >> See....if you came to one of these conferences like OOW or ODTUG, I could …
    Yeah, rubbed it in, why don’t you :)
    >> It has nothing to do with the upload procedure …
    That was my mistake. I meant the downloading/delivery procedure.
    >> I'm not sure I understand what you mean by "free files"
    By “free” files, I meant data files that were uploaded to the database, like scanned documents etc., and not the classic static files like JavaScript, CSS, or the firm logo image.
    Now, with 3.1 native support of BLOB, and the rumors that your team is working on a revised version of the document library package, things might be simpler for issues like (simple) content management.
    >> Please let me know if this does not make sense.
    Tyler post came right on time, to fulfill your pseudocode explanation. After reading Tyler post, I better understand what you meant, and how I can achieve it. At first, I thought that all the HTTP header stuff id done for you, by some built-in or Oracle supplied package, but now I understand it’s the developer responsibly.
    One more thing about Tyler post, which was published prior to version 3.1. He mentioned the need to add some specific entries to the DAD, in order to utilize this technique:
    “If you’re using Oracle HTTP Server (Apache + mod_plsql), add the following lines to your Database Access Descriptor (DAD), then bounce OHS to apply your changes:
    PlsqlCGIEnvironmentList HTTP_IF_NONE_MATCH
    PlsqlCGIEnvironmentList IF_MODIFIED_SINCE “
    Is this still the case with 3.1? I don’t remember reading about these specific entries in the installation documentation. My current DAD don’t includes these entries, and still it seems like the caching of static files is working (I tested against apex.oracle.com).
    Thanks and regards,
    Arie.

  • Not able to access files from Workspace Images and Static files

    Hi,
    We have just migrated our APEX Application from one server to another.
    All the functionality is working fine except the images or files which we are uploading
    in
    Shared Components -> Static Files
    Shared Components -> Images
    We are uloading Images in Shared Components -> Images but those are not getting displayed there.
    Similarly the files which we are uploaded in Shared Components -> Static Files are not accessible. If we
    try to download using download icon its showing blank screen.
    I am using some javascript files which i have uploaded into static files, but not able to refer them in page.
    Please someone guide us how to resolve the above problem.
    Thanks in advance.
    Thanks & Regards
    Sanjay
    Edited by: user11204334 on May 25, 2010 1:35 AM
    Edited by: user11204334 on May 25, 2010 3:45 AM

    Hello Sanjay,
    If you upload any static files such as IMAGES, FILES, or CSS you have to use the tags: #WORKSPACE_IMAGES# or #IMAGE_PREFIX# depending on your files location..
    then try something like htp.p ('<img src="#IMAGE_PREFIX#fileName.gif" />');
    And it should show the fileName.gif on your browser...
    I am not sure if i remember correctly, you can reference files to a specific application or to the whole application, if I am not mistaken..Correct me..
    Regards,
    Noel Alex Makumuli,
    Tanzania

  • How to reference background image url from css?

    Hello,
    I have uploaded some images and css files to the "Shared Components > Images".
    How can I reference my images as "background-image:url('XXX.gif')" for a css element?
    Thanks,
    John

    To make what Tyler said explicit: APEX doesn't perform recursive (or indeed any) substitution on static files, Re: Use uploaded images in uploaded CSS, so images in static files can't be referenced using #APPLICATION_IMAGES# or #WORKSPACE_IMAGES# in style sheets that are themselves static files. The Re: Help with STATIC HTML file reference another STATIC HTML/CSS file..

  • How to upload a image or flash file as blob object in a table.

    How to upload a image or flash file as blob object in a table.
    What are all the possible ways we can do it.

    Searching the forum (or google) would be my first choice, as this question pops up every now and then.
    Next without knowledge of your environment (jdev version and technology stack) it's hard to give a profound answer.
    All I can say is that it's possible.
    Timo

  • HT2493 How to change preview image of a file and NOT the icon ?

    Hello dear Mac users
    How to change preview image of a file and NOT the icon ?
    I know how to change the icon of a file, but I wish to know how to change the preview of any file.
    For example: my file is "mysong.aif", I changed the icon to be "mylogo.png" using cmd+i, cmd+v on the icon. But the preview of the file still remain the same.
    I know it can be changed using iTunes, but I don't want to import all my files in iTune, and iTune cannot import all type of files.
    I hope someone will understand my needs...
    Thanks!

    Thanks BeerbarX
    You can't change the preview image for anything
    hoo
    QuickLook plugin
    what are the plugin ?
    In the case of a music file, it will be that generic black box with a note on it
    That is exactly what I'm asking about !
    MP3 which has a special tagging standard that can include artwork
    How can I "tag" my MP3 without going thru iTunes ? Is it possible to do it dirrectly in the Finder ? Is there other type of files that can include such tags ?
    Thank you for answering my question , wich I have to admit may seem useless, but I wish I could put something like a signature logo on each of the different file I produce (as AIF for music and MP4 for video clip) instead of that generic black box with a note on it, and by the meantime keeping a different icon for all of them in order to illustrate theire content.

  • How to upload an image to EBS file server (Not store in database) with OAF?

    Dear all,
    I can upload an image into database with blob type. But I want to know how to upload an image to EBS file server. I try to search the forum but I cannot find the solution I want.
    Anybody can reallize it? Please give me some advice or idea?
    Thanks.
    Kenny

    Kenny,
    Framework doesn't provide the option of storing the images as files. You can write a javascript to open a popup and provide a standard HTML file upload component which will save the file on specified location.
    --Shiv                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to convert jpeg images into video file of any ext using JMF

    I want to convert the Jpeg files into video clip with the help of JMF
    any one can help me?
    Plz reply me at [email protected]
    or [email protected]

    I'm not sure of his/her reasoning behind this, but I have yet to find a way to record video with mmapi on j2me. So with that restriction, I can see how one could make it so that it just records a lot of jpegs, and then makes it a movie.
    I would be interested finding a workaround for this too. Either if someone would explain how to record video with mmapi or how to make recorded images into a video. Thanks!

  • How can I use images from Jar files

    Hi,
    I would like to use the images provided by ADF if any on my UI like pencil Icon for Edit, pushpin for freeze and so on.
    How can I refer them in Image source. Custom images I have stored in my pubilc_html directory and using them.
    Do I need to unzip that to my project public_html directory ?
    Thanks,
    Satya

    Hi Satya,
    you can reference those images via the ADF resources servlet once you know the correct URL to an image.
    For example, in 10g the pencil icon is called lovi.gif, so its full URL will be
    http://host:port/context-root/adf/images/oracle/lovi.gifand you can use it in an af:objectImage like
    <af:objectImage source="/adf/images/oracle/lovi.gif" />Hope this helps,
    Patrik

  • How to set Mime Type for Static Files

    Hi All,
    I am working on Apex 3.2.1.00.10.
    When I am trying to upload (create) a ".js" file into Static Files under Shared Components of an application; it is saving as "*text/plain*" for Mime Type. But I need Mime type to be set as "*application/x-javascript*".
    Please help me to change the Mime type of .js file.
    Or is there any way to upload the file directly as "*application/x-javascript*" as its Mime Type.
    Thanks in advance.
    Umesh

    In IIS v4 which comes with the Windows NT4 option pack, you right click the web page you are working with, select properties, then go to the HTTP Headers tab. At the bottom there's a button labelled File Types in the MIME Map section.
    After you've clicked that, you can add the two mime types you need;
    Associated Extension MIME Type
    .jar application/x-java-jar-file
    .jnlp application/x-java-jnlp-file
    I'm assuming that it is the same in W2k/IIS5.

  • Don't know how to store/show image or pdf files easily in apex app

    Hi,
    I always want to put a blob column in my table and store some images or pdf files, like drawings for an item, but I found it hard to do, I have viewed the sample app by apex 4.0, but I cannot understand the code.
    Is there a simple and intuitive way of storing/showing pdf files in an apex app?
    I wish Oracle could make an easier wizard for apex on that issue.
    just make storing a file as simple as in MS access, or email attachment, etc.
    no headache coding involved.
    that will be great!
    that will also do Oracle good, since images will use up a lot of spaces, maybe Xe won't be enough, the will consider an upgrade.

    Yawei,
    there is a chapter about BLOB support in the application builder users guide: http://download.oracle.com/docs/cd/E17556_01/doc/user.40/e15517/advnc.htm#BCGGJHEF
    Maybe this helps for a start, even if it isn't as easy as in MsAccess but this may be due to the fact that APEX is a web application and Access a rich client.
    brgds,
    Peter
    Blog: http://www.oracle-and-apex.com
    ApexLib: http://apexlib.oracleapex.info
    BuilderPlugin: http://builderplugin.oracleapex.info
    Work: http://www.click-click.at

  • How to read an image from an file using jsp

    reading an image from an file present on local disk using jsp

    Server-local or client-local? First, File I/O, second: better get a new job.

  • How to include an image or pdf file in a message for this forum

    Can someone please tell me how to include in a message like this one an image or a pdf file?
    Thanks

    Read here _[Help and terms of Use|http://discussions.apple.com/help.jspa]_ which you can also can find in the right panel in the forum
    You can put your image on flickr.com or imageshack.us or similar sites.

  • How to reference an image which is inside of ArrayList?

    Hi,
    I have an item renderer which displays an image.
    When image is loaded from file I'm just using this : <mx:Image source="...
    But how to to reffer the image data (png images) which are inside of  ArrayList ?
    Thanks!

    Taking a guess here:
    <mx:Image source="{myList.getItemAt(3)}">
    Or
    <mx:Image id="someImage">
    then in ActionScript:
    someImage.source = myList.getItemAt(3);

  • How to save an image to a file.

    I created an image by using such APIs as createImage(...). Now I want to save it to my local file. How should I do?

    Thanks for your help. But this is to say that I should use an extra package to achieve it. Are there any APIs in JDK can do the same work!

Maybe you are looking for