function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Baird_SBaird_S 

How to delay execution of a new page for x seconds?

I'm designing a sign-in page for events.  When attendees sign in, I'd like the page to acknowledge them with "Bob, thanks for attending."  And then after 2 seconds, I'd like the page to return to the blank signin form for the next attendee.

 

I haven't been able to find anything that allows me to delay execution like this in the documentation so far.  Any ideas?

Best Answer chosen by Admin (Salesforce Developers) 
Shiv ShankarShiv Shankar

Yes we can achieve this functionality using java script.

 

we can create a VF Page which show Welcome message and we have script whcih will be called on page load.

After specific timperiod we will redirect to the new page - blank event page. Ex.

 

<apex:page>

	Welcome to our organisation
	
	<script>
		setInterval(function(){window.location.href = "http://kvpcorp.com/";},3000);
	</script>

</apex:page>	

 Here 3000 is milisecond   3000 ms = 3 Second.

 

 

All Answers

Shiv ShankarShiv Shankar

Yes we can achieve this functionality using java script.

 

we can create a VF Page which show Welcome message and we have script whcih will be called on page load.

After specific timperiod we will redirect to the new page - blank event page. Ex.

 

<apex:page>

	Welcome to our organisation
	
	<script>
		setInterval(function(){window.location.href = "http://kvpcorp.com/";},3000);
	</script>

</apex:page>	

 Here 3000 is milisecond   3000 ms = 3 Second.

 

 

This was selected as the best answer
Baird_SBaird_S

Shiv, thanks a lot.  That's a big help.