SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Zealot Mr. Ram's Avatar
    Join Date
    Nov 2005
    Posts
    139
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)

    Thumbs up Issue with iFrame loading with HTML reference

    My HTML page is having the following code which displays the Player. The following code is working fine when I open the HTML file directly from browser.
    If I deploy the same HTML file in server, the following code is not working. Pls help me in this.

    Code:
    <iframe id='iplayer' name='iplayer' src='MyJsPlayer.htm' style="vertical-align:top; width:200px; height:22px; scrolling:no; border:0; frameborder:0">
    Your browser does not support iFrame.
    </iframe>
    MyJsPlayer.HTML

    Code:
    <html>
    <body style=margin:3px; bgcolor=#dddddd>
    
    <noscript>
    	<div class="noscript" style="margin:24px;">
    		<img src="noscript.gif" alt="In order to access this site you need to enable JavaScript !" />
    	</div>
    </noscript>
    
    <script type="text/javascript" language="JavaScript">
    <!--
    
    var sUsrAgt = navigator.userAgent;
    var sSearch = self.location.search;
    var sNameLC = sSearch.toLowerCase().substring(1);
    var nameLen = sNameLC.length;
    var sType   = 'unknown';
    
    if (sNameLC.lastIndexOf('.au') >nameLen-6)	sType="audio/basic";
    if (sNameLC.lastIndexOf('.ra') >nameLen-6)	sType="audio/x-pn-realaudio";
    if (sNameLC.lastIndexOf('.rm') >nameLen-6)	sType="audio/x-pn-realaudio";
    if (sNameLC.lastIndexOf('.mid')>nameLen-6)	sType="audio/midi";
    if (sNameLC.lastIndexOf('.mp3')>nameLen-6)	sType="audio/mpeg";
    if (sNameLC.lastIndexOf('.wav')>nameLen-6)	sType="audio/wav";
    
    if (sSearch.length<3) document.bgColor="white";
    else if (sNameLC=='stop' ) document.writeln('<center><small>Audio stopped.</small></center>');
    else if (sType=='unknown') document.writeln('<center><small>Unknown audio file type.</small></center>');
    else 
    { // WRITE HTML TAGS FOR AUDIO PLAYBACK
    
      if (sUsrAgt.indexOf('Opera')!=-1||sUsrAgt.indexOf('MSIE')!=-1) 
    		document.writeln('<bgsound volume=-1000 LOOP=1 src="'+encodeURI(sSearch.substring(1,99))+'">');
      else document.writeln('<object width=194 height=16 data="'+encodeURI(sSearch.substring(1,99))+'" type="'+sType+'"></object>');
    }
    
    -->
    </script>
    </body>
    </html>

  2. #2
    SitePoint Guru
    Join Date
    Sep 2006
    Posts
    731
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you sure you remembered to upload the media files? It's a common mistake.
    Tab-indentation is a crime against humanity.

  3. #3
    SitePoint Zealot Mr. Ram's Avatar
    Join Date
    Nov 2005
    Posts
    139
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    I am Sure. I have uploaded media files too. I have uploaded the application along with media files in 'Google App Engine'.

  4. #4
    SitePoint Zealot Mr. Ram's Avatar
    Join Date
    Nov 2005
    Posts
    139
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    The issue is related to 'Google App Engine' server settings. 'Google App Engine' server is not allowing this functionality (media files).

    I have deployed the same application in TOMCAT web server. The application is working fine.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •