473,396 Members | 2,059 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

'Permission Denied' error when opening an MP3 file in a pop-up window

I would like to create a popup that reloads with a different page depending which link is clicked on the parent page. Here is the code

Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript">
  2.     var childWindow
  3.     function openNewWindow(url) {
  4.         if (childWindow != undefined){                            
  5.             if (childWindow.closed){                            
  6.                 childWindow = window.open(url);                  
  7.             } else {                           
  8.                 childWindow.location.replace(url);
  9.                 childWindow.focus();                
  10.             }
  11.         } else {            
  12.             childWindow = window.open(url);                  
  13.         }
  14.     } 
  15.     function Popup(url){
  16.         openNewWindow(url);
  17.     }
  18.     </script>
It works perfectly, unless i try to open a file as a page for example

"http://www.example.com/data.mp3"

Then I get a permission denied error, when I try to redirect the popup.

Any suggestions.
Oct 3 '07 #1
3 2150
pbmods
5,821 Expert 4TB
Heya, javalsu. Welcome to TSDN!

Changed thread title to better describe the problem (did you know that threads whose titles do not follow the Posting Guidelines actually get FEWER responses?).

Please use CODE tags when posting source code:

[CODE=javascript]
JavaScript code goes here.
[/CODE]
Oct 4 '07 #2
I found a happy medium.
The reason I was getting the permission denied error, is because the new window was an add-in to the browser, in my specific case the quicktime plugin. While I was able to update a browser, I didn't have permission to update a plugin. So I created a page with an embedded player, that could be accessed. It reads in a query string with the location of the mp3 file that was to be played.

Works perfectly now.


I would like to create a popup that reloads with a different page depending which link is clicked on the parent page. Here is the code

Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript">
  2.     var childWindow
  3.     function openNewWindow(url) {
  4.         if (childWindow != undefined){                            
  5.             if (childWindow.closed){                            
  6.                 childWindow = window.open(url);                  
  7.             } else {                           
  8.                 childWindow.location.replace(url);
  9.                 childWindow.focus();                
  10.             }
  11.         } else {            
  12.             childWindow = window.open(url);                  
  13.         }
  14.     } 
  15.     function Popup(url){
  16.         openNewWindow(url);
  17.     }
  18.     </script>
It works perfectly, unless i try to open a file as a page for example

"http://www.example.com/data.mp3"

Then I get a permission denied error, when I try to redirect the popup.

Any suggestions.
Oct 5 '07 #3
pbmods
5,821 Expert 4TB
Heya, javalsu.

Glad to hear you got it working! Good luck with your project, and if you ever need anything, post back anytime :)
Oct 5 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: jn | last post by:
They have a server here that runs PHP as root (which is probably bad). I wrote a test script that tries to create a text file. echo "<B>I'm running as user: " . $_ENV . "</B><BR/><BR/>"; ...
1
by: festivalman | last post by:
Hi, sorry if this is in the wrong spot. Finding the newsgroups on MS's site could have been easier Here's my problem I've got some old asp's that are running our simple web site. In a section,...
2
by: Taishi | last post by:
New user of SQL Everything is on the same machine My error is close to the bottom After reading it today, I can see there is a problem with 2 dbases 'PUBS' and 'Master' There are also some...
0
by: Jeremy | last post by:
I have an ASP.net application which needs to retreive images from multiple remote machines. It is reterieveing images generated by a web cam service on those machines. All of these machines,...
11
by: Alec Wysoker | last post by:
Using Python 2.3.5 on Windows XP, I occasionally get OSError: Permission denied when calling os.remove(). This can occur with a file that is not used by any other process on the machine, and is...
1
by: Jake Barnes | last post by:
I can not figure out the meaning of this error: Error: " nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "JS frame :: http://www.bluecasts.com/pdsIncludes/pdsAjax.js ::...
3
by: fniles | last post by:
In our ASP page, we call XMLHttp to download XML files. When calling our page using localhost (localhost/myWebSite/myPage.htm), it works, but when calling using the IP address of the web server...
4
by: stephen | last post by:
Hi, I am getting an error while trying to create an excel file. "Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the...
0
by: phil469 | last post by:
I'm having an issue when trying to read a file in a user's homedir from a cgi script. I have a virtual host section in my httpd.conf file which I'll include. The cgi script is a very basic script...
0
by: debug03 | last post by:
I am executing a DTS package on a Windows 2000 sp4 server running SQL Server 2000 and IBM DB2 V7 client. The DTS package source data(SQL Server) is selected from SQL server table and inserts data to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.