Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q383 How can I play a wav file when someone clicks on a link which at the same time changes the current page?

irt.org | Knowledge Base | JavaScript | Sound | Q383 [ previous next ]

Q383 How can I play a wav file when someone clicks on a link which at the same time changes the current page?

Tricky. The actual playing of the wav file will be interrupted by the loading of the next document. You'd have to load the wav file into another window or another frame for it to contine playing.

Something like:

<a href="nextpage.htm" onClick="parent.otherframe.href='sound.wav'">click for next page</a>

or perhaps:

<a href="nextpage.htm" onClick="window.open('sound.wav')">click for next page</a>

Feedback on 'Q383 How can I play a wav file when someone clicks on a link which at the same time changes the current page?'


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.