View Single Post
  #24  
Old 04-14-2012, 04:09 AM
Steve Strickland1's Avatar
Steve Strickland1 Steve Strickland1 is offline
Junior Member
 
Join Date: Apr 2012
Posts: 13
Default

Hi Makfruit,

Perhaps you can help me w/this code. My timeout isn't working.

<script>
var confirmationPageURL = "http://google.com";

// Add handler for Ecwid's OnPageLoad event
if (
typeof(Ecwid) == 'object'
&& typeof(Ecwid.OnPageLoad) == 'object'
) {
Ecwid.OnPageLoad.add(function(page) {
// Redirect user if needed
if (
typeof(page) == 'object'
&& 'ORDER_CONFIRMATION' == page.type
) {
window.location = confirmationPageURL;
window.setTimeout(confirmationPageURL, 8000, true);
}
});
}

</script>

As you mentioned in your previous post, I could use the window.setTimeout....and I am, but it's not working - and it's probably my fault for incorrect usage, since I know nothing about JavaScript. Do you know why it's not delaying for 8 seconds, but rather just does the redirect instantly?

Thank you again.