cancel
Showing results for 
Search instead for 
Did you mean: 

URL Iview Javascript permission problem

Former Member
0 Kudos

Dear all,

I have create a simple URL Iview that points to an index html file in the KM of the portal

(http://<servername>:50000/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/CF/CF_B2B/HelpManuals/web/index.html) . When I perform a preview from the iview it works OK. But if I include it in a page or a workset I get a javascript permission error on document.write(...) command. I have other URL iviews that point to KM (actually a file server repository) and they work just fine. Any idea on what is going on???? Thanks.

....Socrates>>

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

So after a few days I managed to finally get a workable solution:

Whenever you are referring to a script file in your main page, you will not be able to open the file when in normal mode, even with relaxing the domain and all the other hints posted.

What you need to do is to include the actual content of the *.js file in the main html page.

For example, if you have a page called index.html that refers to a file AC_RunActiveContent.js which is located in your scripts directory, you will need to change the code in the index.html file as follows:

Initial HTML File:*

< HTML>
< HEAD> 
< TITLE>Test Page</TITLE>
<!-- Collapsible Panel Java Script -->
< s c r i p t  s r c="../scripts/collapsiblepanel. j s" type="text/ j a v a s c r i p t"></ s c r i p t>
<!-- Collapsible Panel Java Script -->
< /HEAD>
< BODY>
< /BODY>
< /HTML>

New HTML File:


< HTML>
< HEAD>
< TITLE>Executive Committee - Balance Sheets</TITLE>
<!-- Collapsible Panel Java Script -->
< s c r i p t t y p e="t e x t / j a v a s c r i p t ">
your actual javascript code
< / s c r i p t >
<!-- Collapsible Panel Java Script -->
< /HEAD>
< BODY>
< /BODY>
< /HTML>

By doing this:

You will be able to use java scripts in your html file and applications without experiencing the problems mentioned. Keep in mind though that you will now have all your script file code in your actual html file and the number of lines in the files will increase dramatically.

The increase in size of the actual html files are not too bad, a normal 2Kb html file may increase to 70Kb if not more, depending on the code contained in the initial *.js file.

I have played around with this and have been able to include Macromedia Flash objects in my html files too, by pasting the actual code content in the html files as opposed to refereincing the script in the relevant directory.

I hope this helps.

Regards,

Freddie Botha.

Former Member
0 Kudos

Solved!!!

Former Member
0 Kudos

Hi, could you please let the rest of us know how you resolved this issue.

Thank.

Freddie Botha

Former Member
0 Kudos

Hi,

1. Ensure that you use FQDN for accessing the portal.

2. In the IE->Tools->Internet Options ->Security tab ->

Internet Zone -> Custom Level, change "Initialize and script ActiveX controls not marked as safe" to either

"Prompt" or "Enable"

A better choice might be:

Tools -> Internet Options -> Security tab -> Trusted sites Zone -> Sites, enter the domain name of the site you'd like the script to run from in the "Add this Web site to the zone:" text box and click "Add".

If the site is not https, you'll need to uncheck the "Require server verification (https:) for all sites in this zone" checkbox before clicking "Add".

Hope this helps !

Regards

Srinivasan T

Former Member
0 Kudos

From the URL you can see tha I use FQDN (both for the URL iview and the way I access the portal). I have already added the site in the list of trusted sites, but no luck. I have try all isolation methods of iview and page. As I said before it works in iview preview but not in the page previou therefore I think it has to do in the way that the page is calling the Iview and not the setting of the browser... Thanks.