cancel
Showing results for 
Search instead for 
Did you mean: 

Insert custom *.js file in all existing iViews in the Portal

0 Kudos

Hi,

My question is if I can include a custom *.js file in the Portal framework or in each iView, script that has to run for each iView and I do not need to modify each iView code.

I'm trying to custom the date format for each iView that has an input type="DATE" in the UI. Thank you

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

Thank you

0 Kudos

There is any way to modify the com.sapportals.portal.iview / portalapp.xml with

<property name="com.sap.portal.reserved.iview.PageLevelScript_1" value="dateformat.js" >

<property name="Path" value="/irj/servlet/prt/portal/prtroot/com.sapportals.km.docs/documents/pwc_pubdoc_root/PortalDateFormat/dateformat.js" />

</property>

or maybe at the PageBuider Level so will load my "dateformat.js" file after the SAP js file?

Can be this overwritten by any future SP of the Portal?

You answer is very appreciated.

Former Member
0 Kudos

You would need a way to get into each portal component at the code level, as generally iViews run in Iframes, and add your code there.

Because SAP doesn't ship the code for the portal components, I think you'll have a lot of problems doign this.

Cheers

Former Member
0 Kudos

Hi Corina,

I dont think there is a way to mention this automatrically in all iVIews. You can perhaps put your JS file in any shared location of portal directory like portal itself does for its inbuilt js files. But inside your iViews you HAVE to mention the location of that new JS file. So again - you are going back to taking the pain of changing each and every iView you have. Dont think this can be achieved in the current scenario.

Regards,

Shubho