Slient javascript url redirection

hi

I need to redirect the user to another url in 5 seconds without the “click” sound.

you’ll notice that this:

setTimeout("location.href='http://myurl';",5000);

produces a “click” sound (maybe only in IE).
I want to avoid this sound in my code (I know this can be changed in windows in the user’s computer).

can it be done?

No.

how about using a meta refresh tag (not javascript)? how about Ajax ?

The click sound is from the web browser as it loads a new page.
You do not have the power to change that.

It might be possible to replace page content using Ajax, but that’s normally for small sections. It’s kind of drastic to use it to load the entire contents of some different web page.

However, you could use an iframe, and point that iframe at a different web address. That would work.

iframe method: the following makes a “click” sound as well:

<iframe src="http://google.com/" id="iframeA"></iframe>
setTimeout("document.getElementById('iframeA').src='http://yahoo.com';",5000);

That’s right. See the previous post regarding Ajax and iframes