This discussion is archived
2 Replies Latest reply: Feb 4, 2013 3:12 PM by Lmocsi RSS

Page refresh not working with iFrame

Lmocsi Newbie
Currently Being Moderated
Hi,

I'm using Apex 4.0.2.00.07.
I've created a process for a Refresh button like this:
begin
  -- some processing

  :p31_time := to_char(sysdate,'YYYY.MM.DD. HH24:MI:SS');
  htp.script('window.opener.document.reload(true);');
end;
This code works fine on pages without iFrame (and AFAIK it works fine on Apex 3.x with iFrames, as well).
But in Apex 4 on a page with iFrame, i get the following, and the page will not reload:

Location: f?p=107:35:4045913931304668::NO

It seems that part of the URL was copied to the webpage, since the source of the above line is:
<SCRIPT>window.opener.document.reload(true);</SCRIPT>
Location: f?p=107:35:4045913931304668::NO
And the URL changed to this:
http://my.server:7777/pls/apex/wwv_flow.accept

instead of (this was the original):
http://my.server:7777/pls/apex/f?p=107:35:4045913931304668:::::

Please advise how to refresh a page with iFrames on it.

Thanks and regards,
Laszlo
  • 1. Re: Page refresh not working with iFrame
    Hari_639 Guru
    Currently Being Moderated
    Hello,
    Lmocsi wrote:
    Hi,

    I'm using Apex 4.0.2.00.07.
    I've created a process for a Refresh button like this:
    begin
    -- some processing
    
    :p31_time := to_char(sysdate,'YYYY.MM.DD. HH24:MI:SS');
    htp.script('window.opener.document.reload(true);');
    end;
    Are you running this process using an AJAX call? or You run this process as "after submit process"?

    When you submit the page, then there is no need to reload the page explicitly. APEX will do it for you. You just need to create branch!

    Regards,
    Hari
  • 2. Re: Page refresh not working with iFrame
    Lmocsi Newbie
    Currently Being Moderated
    Hi,

    When you submit the page, then there is no need to reload the page explicitly. APEX will do it for you.

    Meanwhile I realized it.

    Thanks.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points