Variable Not Working in Firefox

turtleman2009
turtleman2009 used Ask the Experts™
on
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?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
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-
HainKurtSr. System Analyst

Commented:
i am getting error in both FF & IE
HainKurtSr. System Analyst

Commented:
the script says

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

look at url, file name you want to open is ".html"
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

HainKurtSr. System Analyst

Commented:
-null-, there is no link, just a tr with an onClick event...

Commented:
.html is just a file extension.  Where is the file's name?
HainKurtSr. System Analyst

Commented:
not related to any browser, this should nto work in any browser :)

Author

Commented:
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

HainKurtSr. System Analyst

Commented:
maybe you should use "itunes:order" instead of "order"

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

-->

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

Author

Commented:
I'm afraid that did not work either.
Sr. System Analyst
Commented:
is there any way to change this xml?

itunes:order --> itunesorder

and use

var id = $(this).find('itunesorder').text();
HainKurtSr. System Analyst

Commented:
solution:

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

Author

Commented:
This got me on the right path. Thanks for your help.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial