cancel
Showing results for 
Search instead for 
Did you mean: 

Access denied

Former Member
0 Kudos

We are migrating from SAP 4.6.C with standalone ITS to WebAS 6.40 with integrated ITS. In one of the IACs we are using a small Javascript to open a new window to show a picture. No problems in the old environment, but with the integrated ITS we now get the "Access denied" error. Using a script debugger I can see that the window.open is executed without any problem, but the statement window.document.writln("<HTM>... and so on") is blocked.

I have noticed SAP uses a Javascript for Domain Relaxation on every HTML-page and I have read some comments in several SDN-forums, but I didn't find any solution to this problem (of course using Mozilla it is all working without any problem, only the Microsoft IE has problems.....).

Does anyone have a clue how to solve this?

Accepted Solutions (1)

Accepted Solutions (1)

thorsten_domsalla
Active Participant
0 Kudos

Hello Mr. Heutmekers,

you're right, it's an domain relaxing issue.

Before writing into another window/frame, you have to relax the domain and set the document.domain of the opened window to the same document.domain of your service window.

Create a static HTML document with empty body and put the following line into the HTML head:

<script language="JavaScript" tpye="text/javascript" src="relative_path_to/system/script/sapwebframework.js"></script>

<script language="JavaScript" type="text/javascript">

SAP_bindPageToDomain();

</script>

The Javascript function SAP_bindPageToDomain() is supposed to do the job. Please change the "relative_path_to..." appropriately.

Then you will be able to write into the body of this HTML document. I recommend to use DOM functions.

With best regards,

T. J. Domsalla

Former Member
0 Kudos

Thanks mr. Domsalla,

I have created the static HTML document as you described. However, I still get the same error when I use the following code:

win = window.open('NEW_WINDOW.html')';

win.document.writeln("<BODY>`MIMEURL(~name="image/picture.gif")`</BODY>)"

Any suggestions?

Regards,

John.

Former Member
0 Kudos

John,

I saw your SDN forum post regarding Access Denied error in Javascript. Did you find the solution for that.

I am facing same kind of problem when i upgrade SRM3.0 to SRM5.0 (External ITS to Internal ITS). We have custom pages In that template i am trying to call Calender pop up. But i got access denied error. If you have a clue let me know.

Thanks for your valuable time

Answers (0)