Solved

Variable Not Working in Firefox

Posted on 2011-09-02
12
277 Views
Last Modified: 2012-05-12
I am not quite sure what the problem is but the video player I am working on works in Safari but when i use firefox when i click on a video from the list instead of loading the video page in the correct frame an error 404 shows up instead.

http://www.hfphoto.org/hw7/player.html

Could someone please help?
0
Comment
Question by:turtleman2009
  • 7
  • 3
  • 2
12 Comments
 
LVL 5

Expert Comment

by:-null-
ID: 36474270
Hi

Sounds like the hyperlink you are clicking is using javascript?  If so, try putting return false;  as the last statement in the onclick handler.  This prevents the browser from trying to follow the url after it's clicked.


hth


-null-
0
 
LVL 51

Expert Comment

by:HainKurt
ID: 36474303
i am getting error in both FF & IE
0
 
LVL 51

Expert Comment

by:HainKurt
ID: 36474309
the script says

parent.videoframe.window.location='http://www.hfphoto.org/hw7/.html

look at url, file name you want to open is ".html"
0
Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 
LVL 51

Expert Comment

by:HainKurt
ID: 36474319
-null-, there is no link, just a tr with an onClick event...
0
 
LVL 5

Expert Comment

by:-null-
ID: 36474321
.html is just a file extension.  Where is the file's name?
0
 
LVL 51

Expert Comment

by:HainKurt
ID: 36474332
not related to any browser, this should nto work in any browser :)
0
 

Author Comment

by:turtleman2009
ID: 36474378
It is pulling a number off of an xml file, It finds the numbers in the <itunes:order> section of each item and then stores that value in the variable "id" and then this is placed directly before the .html.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<style type="text/css">
<!--
.bggrey {
	background-color: #CCC;
	
}
body {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 10pt;
	margin: 0px;
}
td {
	padding-top: 3px;
	padding-right: 10px;
	padding-bottom: 3px;
	padding-left: 10px;
}
tr {
	
}
tr:hover { background-color: #e1eafe; cursor:pointer;cursor:hand;}
body { 
scrollbar-face-color: #300; 
scrollbar-shadow-color: #600; 
scrollbar-highlight-color: #600; 
scrollbar-3dlight-color: #600; 
scrollbar-darkshadow-color: #600; 
scrollbar-track-color: #300; 
scrollbar-arrow-color: pink; 
} 
-->
</style>
	<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.js"></script>
	<title>Reading XML with jQuery</title>
     <script>
     	$(document).ready(function(){
			$.ajax({
				type: "GET",
				url: "http://www.hfphoto.org/podcast/hw7v.xml",
				dataType: "xml",
				success: function(xml) {
					$(xml).find('item').each(function(){
						var id = $(this).find('order').text();
						var title = $(this).find('subtitle').text();
						var url = 'http://www.hfphoto.org/hw7/'+id+'.html'
						var date = $(this).find('pubDate').text();
						$('<div class="items" id="link_'+id+'"></div>').html('<tr onclick="parent.videoframe.window.location=\''+url+'\'"><td width="122">' + date + '</td><td width="179">HeavenWord7</td><td width="349">' + title + '</a></td></tr>').appendTo('#page-wrap');
						
					});
				}
			});
		});
     </script>
</head>
<body>
	<table id="page-wrap" width="650" border="0" cellspacing="0" cellpadding="0">

</table>
</body>
</html>

Open in new window

0
 
LVL 51

Expert Comment

by:HainKurt
ID: 36474482
maybe you should use "itunes:order" instead of "order"

var id = $(this).find('order').text();

-->

var id = $(this).find('itunes:order').text();

0
 

Author Comment

by:turtleman2009
ID: 36474545
I'm afraid that did not work either.
0
 
LVL 51

Accepted Solution

by:
HainKurt earned 500 total points
ID: 36474620
is there any way to change this xml?

itunes:order --> itunesorder

and use

var id = $(this).find('itunesorder').text();
0
 
LVL 51

Expert Comment

by:HainKurt
ID: 36474792
solution:

var id = $(this).find('itunes\\:order').text();
var title = $(this).find('itunes\\:subtitle').text();
alert(id + " : " + title);
0
 

Author Closing Comment

by:turtleman2009
ID: 36474987
This got me on the right path. Thanks for your help.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction HyperText Transfer Protocol (http://www.ietf.org/rfc/rfc2616.txt) or "HTTP" is the underpinning of internet communication.  As a teacher of web development I have heard many questions, mostly from my younger students who have come to t…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question