Solved

Variable Not Working in Firefox

Posted on 2011-09-02
12
279 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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:Huseyin KAHRAMAN
ID: 36474303
i am getting error in both FF & IE
0
 
LVL 51

Expert Comment

by:Huseyin KAHRAMAN
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 51

Expert Comment

by:Huseyin KAHRAMAN
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:Huseyin KAHRAMAN
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:Huseyin KAHRAMAN
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:
Huseyin KAHRAMAN 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:Huseyin KAHRAMAN
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
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…

735 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