My Oracle Support Banner

Javascript in the HTML Markup Task flow only runs once (Doc ID 1559545.1)

Last updated on OCTOBER 10, 2023

Applies to:

Oracle WebCenter Portal - Version 11.1.1.6.5 and later
Information in this document applies to any platform.

Goal

Provide steps to run inline Javascript in the out of box 'HTML Markup Task flow' so that it will run whenever you view HTML Markup's Page.

Sample steps that displays the issue that is not desired:

  1. Create a new Portal Group Space (for this test use "Documents Exchange" template), lets call it myGroupSpace.
  2. As a Moderator, Edit  "myGroupSpace".
  3. Navigate to Pages, Create two empty Pages (i.e. Page1, Page2)
  4. Navigate to Group Space Settings, Resources, Navigations.
  5. Create a New Navigation. Call it "myGroupSpaceNav".
  6. HighLight/select "myGroupSpaceNav". Under Edit (menu), select 'Show'.
  7. Highlight/select "myGroupSpaceNav". Under Edit, select Edit.
  8. Choose to add a Link. Input as follows:
    ID = LinkPage1
    Name = LinkPage1
    Path = (click the magnifying glass to search for Page1 in "myGroupSpace".
  9. Save the Link.
  10. Repeat the same, create a Link "LinkPage2" for Page2 in "myGroupSpace"..
  11. Back in the Group Space Settings, General (tab), select the newly created navigation "myGroupSpaceNav" for the "Navigation" property under "Display Settings" section.
  12. Save the changes.
  13. Return to Group Space "myGroupSpace". Notice Links LinkPage1 and LinkPage2 are displayed. Test navigation by clicking on each link. Pages are blank since no content exists.
  14. Navigate to "Page2" and choose to edit the Page.
  15. Add the 'HTML Markup" task flow to the Page.
  16. Edit the task flow by clicking the little wrench.
  17. Copy/Paste the snippet of code below:

        Above code is expected to display an alert every time Page2 is accessed.

  18.  Navigate between Page1 and Page2 by clicking on the links. Notice, the alert is only displayed when Page2 is accessed the first time.  

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.