on 11-16-2006 10:42 AM
Hello All,
I am facing a peciular problem. I am using the following
code to get the contents of the in the cache in the <b>
display_url</b> variable
doc_len = XSTRLEN( var_string ).
***Create an intance of the cache
CREATE OBJECT cached_response TYPE cl_http_response
EXPORTING
add_c_msg = 1.
***Sets the HTTP body of the entity to the given data
cached_response->set_data( data = var_string
length = doc_len ).
***Sets the value of the header field
cached_response->set_header_field(
name =
if_http_header_fields=>content_type
value = 'application/doc' ).
***Sets current HTTP status code
cached_response->set_status( code = 200 reason
= 'OK' ).
***Sets relative expiry time for this response in server
cache
cached_response->server_cache_expire_rel( expires_rel
= 180 ).
url = runtime->application_url.
CONCATENATE url '/' partner '.doc' INTO <b>display_url</b>.
CONDENSE display_url NO-GAPS.
****Put New Object in the ICM Server Clipboard (ICM)
cl_http_server=>server_cache_upload( url =
display_url
response =
cached_response ).
Its is working fine.
To open a new window I use the following code But with
every click it opens a new window..
<A href = "#" onclick = "Javascript:Show_CV()" >Display Uploaded CV </a>
<script language="Javascript">
function Show_CV()
{
var x = window.open('<%= display_url%>');
x.focus();
}
</script>
To Over come the Problem so that every click will not
open a new window I make the following
changes.But problem with this code comes that for first
click it opens a window thats ok. But on
second click it closes that already opened window.
<A href = "#" onclick = "Javascript:Show_CV()" >Display Uploaded CV </a>
<script language="Javascript">
function Show_CV()
{
var x = window.open('<%= display_url%>',<b>'window_name'</b>);
x.focus();
}
</script>
Please provide a solution for that. Points will be
surely awarded.
Thanks & Regards
Aashish Garg
Message was edited by:
aashish garg
Hi,
Can you try to put the code more readable pls?
Eddy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello ,
Actually my problem is not in opening the document.
My problem is when I open the window for first time with window.open code it opens the winow with contents.
when I click on the window next time it closes that open window.
I am using the following code.
function Show_CV()
{
var x = window.open('<%= display_url%>','window_name');
x.focus();
}
Now I think you will understand my problem.
Regards,
Aashish Garg
Message was edited by:
aashish garg
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.