Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

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

You are here: irt.org | FAQ | JavaScript | Sound | Q383 [ previous next ]

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?'

©2018 Martin Webb