Meaningless Drivel is fun!
The moose likes HTML, CSS and JavaScript and the fly likes Downloading songs in same window Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Downloading songs in same window" Watch "Downloading songs in same window" New topic

Downloading songs in same window

shankar vembu
Ranch Hand

Joined: May 10, 2001
Posts: 309
I have a web page that links to some mp3 files in my server. I also have a flash component in the same page that calls a javascript in the page on some event(say a push button).
Now when I click to download an mp3 in the same window, my default player gets opened and plays the mp3. Fine. But when i click the flash button, the javascript is not getting called. My page turns blank with the address bar showing javascript:myfunctionname and I get the error warning in the status bar instead of "Done".
So, I think the problem is due to the mp3 being opened in the same window. My feeling is that since the response is an mp3 in the same window and being opened in my default player, the HTML page that is still visible is unable to execute the scripts. This sounds strange but I was able to solve my problem by opening the mp3 in a new window.
So, to put it in simple words, what happens when the response is thrown back to the main window but opens some other application... Will I still be able to execute actions from the page present in the main window? Or is this a problem with Flash???

p.s. BTW this happens only with IE. Works OK with mozilla, netscape
[ May 23, 2004: Message edited by: shankar vembu ]
I agree. Here's the link:
subject: Downloading songs in same window
It's not a secret anymore!