on 08-12-2010 5:45 AM
Hi Experts,
When clicking button in an assignment block of campaign screen, it should open an URL (SRM screen) in new window.
I have written the following code in htm page inside script tag.
window.open("lv_url").focus();
lv_url is obtained from the eventhandler onclick.
First time, when I click on the button, the URL is opened in the new window successfully. If I close that window (SRM screen),
and click on the button again, it is executing the code window.open but not opening a new window. Please help.
Thanks,
Ramya
Hi Ramya,
The problem is with the window handler. That is the window handler doesnt terminate even when you manually close the new window and so when attempting to open a same url it doesnt show up.
One solution is to generate a guid and pass it with the url so that the url will differ (since the guid differes the url will not be the same). Check the below sample code,
<%
CALL FUNCTION 'GUID_CREATE'
IMPORTING
EV_GUID_32 = lv_guid.
CONCATENATE 'guid=' lv_guid INTO lv_query.
CALL METHOD cl_crm_web_utility=>create_url
EXPORTING
iv_path = lc_path
iv_query = lv_query
iv_absolute = lc_flag
iv_in_same_session = lc_flag
iv_server_object = server
iv_no_cookie = 'X'
RECEIVING
ev_url = lv_url.
%>
<scirpt language="javascirpt">
window.open(' <%= lv_url %> ');
window.close();
</script>
Regards,
Arun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.