cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Serve Cache Issue

0 Likes
260

Hi buddies,

I have been made up a download code and I'm using the serve cache functions.

So, After got my path to the file as you can see below:

Oninputprocessing:

cl_http_server=>server_cache_upload( url      = display_url
                                          response    = cached_response ).

I left in my current screen two ways to get the file, one of them is through the link directly to the file using the code below:

<htmlb:link id      = "ID_DOWNLOAD01"
                    text          = "Click Here!"
                    reference     = "<%=display_url%>"
                    target        = "_BLANK"/>

The other way is through the onLoad event, I'm calling a javascript function that contain the window.open statament.

Well, If i click to the link "Click here" a auto popup screen shows me up to accept the file. But when I use the window.open at the onLoad event, the screen open and close without let me get the file. Both way lead me to the display_url path that I got from the serve cache. By the way I've trying absolute and relative path.

I've trying to using window.location.href to get the file in the same screen, but this one mess with my application.

Any idea how can I make this file available?

Thanks in advance,

Alex

View Entire Topic
athavanraja
Active Contributor
0 Likes

do not call the js function in onload instead call like below


<% IF not display_url IS INITIAL.
      %>
      <sc ript lang uage="Jav ascript">
     
        wi ndow .op en("<%= display_url%>");
      < / scrip t>
      <%
  ENDIF.
      %>

0 Likes

Thank you! I got a new problem, but i will open a new issue.