Sendkey to HTML iFram

I need to have a website open in an iframe and every few minutes send alt A to refresh the contents of the website.  Below is the code I have that is not working


<iframe src="">
<script type="vbscript">

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.SendKeys "%(A)"
Sleep 300
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Most modern browsers support a META tag in the head section of your page, which can be used to refresh:

<meta http-equiv="refresh" content="300">

It would just refresh the current loaded page, and thus your iframe?  You can also specify a page to refresh if you need to include a querystring or parameters

<meta http-equiv="refresh" content="5; url=">

I've used it in a few pages that run on IE9/10, Chrome, and Firefox, all of which support it without an issue.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
JWC_TNAuthor Commented:
Attempting to use the refresh will log out the user of the website instead of refreshing the content
In html it is more common to use javascript. Write a javascript that will set the src of the iframe every x seconds. The javascript function to use for that is setInterval().


<iframe id="myiframe" src="">

function RefreshIFrame() {
    document.getElementById('myiframe').src = '';

window.setInterval(RefreshIFrame, 60000);


It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VB Script

From novice to tech pro — start learning today.