# Key listener sleep and reload an Iframe

**URL:** <https://forum.kirupa.com/t/key-listener-sleep-and-reload-an-iframe/212325>\
**Category:** Uncategorized\
**Created:** [January 10, 2007, 6:43am UTC](https://forum.kirupa.com/t/key-listener-sleep-and-reload-an-iframe/212325 "2007-01-10T06:43:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![govtcheeze](https://avatars.discourse-cdn.com/v4/letter/g/8e8cbc/32.png) [@govtcheeze](https://forum.kirupa.com/u/govtcheeze)\
**Post date:** [January 10, 2007, 6:43am UTC](https://forum.kirupa.com/t/key-listener-sleep-and-reload-an-iframe/212325/1 "2007-01-10T06:43:51Z")

</div>

Would it be possible to have a keylistener accomplish the following pseudo code:

doSomething();  
sleep(1);  
reload Iframe on page;

How this relates:  
I have multiple frames on my page, one which contains the flash chatroom. It has a keylistener set up for the various direction keys, and after an arrow is pushed I need it to doSomething, sleep for 1 second while doSomething runs, then reload an iFrame on the page containing php code that queries the changes doSomething performed.
