Solved

Variable Not Working in Firefox

Posted on 2011-09-02
12
273 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-
Comment Utility
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
Comment Utility
i am getting error in both FF & IE
0
 
LVL 51

Expert Comment

by:HainKurt
Comment Utility
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
 
LVL 51

Expert Comment

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

Expert Comment

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

Expert Comment

by:HainKurt
Comment Utility
not related to any browser, this should nto work in any browser :)
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 

Author Comment

by:turtleman2009
Comment Utility
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
Comment Utility
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
Comment Utility
I'm afraid that did not work either.
0
 
LVL 51

Accepted Solution

by:
HainKurt earned 500 total points
Comment Utility
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
Comment Utility
solution:

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

Author Closing Comment

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

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer …
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
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…

762 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now