Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sound plays locally, downloads on site

Status
Not open for further replies.

mgason

Technical User
Feb 6, 2003
158
0
0
AU
Hi,
yes I have 2 questions up related to audio!
Not sure Javascript is the problem.
I am trying 2 completely different methods. Either would be OK if they worked.
With this method the audio works fine testing locally in the browser, popping up a window with a helper player BUT when on the site it opens the window which then downloads the mp3 instead of playing it.

This is the script
Code:
<script>
<!--
function wopen(url, name, w, h)
{
// Fudge factors for window decoration space.
 // In my tests these work well on all platforms & browsers.
w += 32;
h += 96;
 var win = window.open(url,
  name, 
  'width=' + w + ', height=' + h + ', ' +
  'location=no, menubar=no, ' +
  'status=no, toolbar=no, scrollbars=no, resizable=no');
 win.resizeTo(w, h);
 win.focus();
}
// -->
</script>
This is the code for the link text
Code:
<a href= "uploads/2ndGraders.mp3" target="popup"
 onClick="wopen('uploads/2ndGraders.mp3', 'popup', 350, 150); return false;">
2nd Graders talk about Museum Magnet</a>
hope someone can help. I am not a javascripter, I just hunted down a couple of things that looked like they might work.
thanks
Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top