Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Timed redirect back to home page

510477Oct 7 2010 — edited Oct 8 2010
I have a page that displays after a user submits input. After the page displays, I'd like to redirect to a home page after 5 seconds. The trick is that I need to maintain the session state. I've figured everything out except how to get the URL into the timeout call. Can someone point me in the right direction?

I have an item: P3_URL that is being set by a BEFORE HEADER computation:
select 'http://192.168.168.201:7777/pls/htmldb/f?p=113:4:'||&APP_SESSION.||':::::' from dual
My HTML header is as follows:
<script type="text/javascript">
redirectTime = "5000";
redirectURL = document.getElementById("P4_URL").value;
function timedRedirect() {
	setTimeout("location.href = redirectURL;",redirectTime);
}

addLoadEvent(function(){timedRedirect();});
</script>
I've verified that the URL is populating correctly as a hidden page item, and the timeout works if I substitute with an Alert box. If I hard-code the URL it also works. This should be an easy thing, but I'm not great at JavaScript.
This post has been answered by 560577 on Oct 8 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 5 2010
Added on Oct 7 2010
8 comments
872 views