Solved

Variable Not Working in Firefox

Posted on 2011-09-02
12
280 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 53

Expert Comment

by:Huseyin KAHRAMAN
ID: 36474303
i am getting error in both FF & IE
0
 
LVL 53

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
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 
LVL 53

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 53

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 53

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 53

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 53

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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…
This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
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…
Suggested Courses

752 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