cancel
Showing results for 
Search instead for 
Did you mean: 

Import JavaScript in a Portal iView?

0 Kudos

Hi everybody,

I would like to know if it could be possible to load a JavaScript in a portal web page directly.

Thanks a lot.

Kind Regards.

Accepted Solutions (1)

Accepted Solutions (1)

former_member184970
Active Participant
0 Kudos

Hi,

Can you give more details of your requirement? What do you mean when you say a portal webpage? Do you mean standard SAP portal pages or custom developed web applications? and where you need to load the javascript?

Regards

Veera

0 Kudos

Hi Veera,

I mean an iView, can we import JavaScript from an external source or we have to create a WebDynpro to do it?

Thanks a lot.

Victoria

former_member184970
Active Participant
0 Kudos

Hi Victoria,

If I understand your requirement properly,you anyway need a HTML/server side script like servlet or JSP to execute your java script. You can embed you external javascript in a HTML file and call this from a URL iview(ofcourse you need to host in a web server) or alternatively you can keep the HTML file in KM and access it using KM Document iview.

Regards

Veera

0 Kudos

Hi Veera,

Thank you very much for your explanation, the reason why I am asking this question is about these two question I have received:

1. We need to load our JavaScript in portal web page. As I know there is iView portlets we can develop for portal. Can we load our JavaScript using an iView? Is there any other way to run our JavaScript in portal page?

You gave me a very good answer to this question

2. If we succeed to load our JavaScript in portal page, we will have to setup proxy to redirect our AJAX calls to CUCM, because of the cross-browser policy of the browsers.

I have no idea what this question is about because of I though that AJAX is supported by SAP Portal.

Would you mind to help me to understand the meaning, please?

Thank you a lot.

Kind Regards,

Victoria

former_member246153
Active Contributor
0 Kudos

Hi,

AJAX calls will be supported inside the Portal application no problems with that.


if you succeed in adding the JavaScript , then if your AJAX call contains any Cross domain URL request then you need to setup proxy in order to avoid cross-browser policy.


If your AJAX call is inside same domain then you can hit any portal component inside your portal domain and you can get the response without any problem.

Regards,

Srinivasan v

0 Kudos

Hi Srinivasan,

Thank you so much for your help and for your quick answers.

Kind Regards,

Victoria

Answers (0)