Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

html only works for firefox

Posted on 2010-09-21
8
Medium Priority
?
704 Views
Last Modified: 2013-12-25
The attached code yields a blank page with ie, chrome & safari.
Must be missing something simple.  

Please help? jack.xml
!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"><title>Jack Goes Boating Official Website</title>

<link href="styles2.css" rel="stylesheet" type="text/css" media="all">
<style type="text/css">
<!--
body {
margin: 0px;
margin-left: 10px;
padding: 0px;
background-color: #FFF;
text-decoration: none;
font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
}
a {
text-decoration: underline;
font-size: 12px;
color: #0093e3;
font-weight: bold;
}
strong {
text-decoration: none;
font-size: 22px;
color: #666;
font-weight: bold;
}
iframe {
padding: 0px;
height: 430px;
width: 530px;
border-top-width: 1px;
border-right-width: 0px;
border-bottom-width: 1px;
border-left-width: 0px;
border-top-style: solid;
border-right-style: none;
border-bottom-style: solid;
border-left-style: none;
border-bottom-color: #CCC;
border-top-color: #CCC;
margin: 0px;
}
</style>
</head><body>
<!--<iframe src="jgbths.pdf">[Your browser has been configured not to display inline frames. You can access <a href="jgbths.pdf">the document</a> via a link though.]</iframe><br>
<a href="jgbths.pdf">Download PDF</a> -->
<script type="text/javascript">if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.open("GET","jack.xml",false);
xmlhttp.send();
xmlDoc=xmlhttp.responseXML;
document.write("<table border='0'>");
var x=xmlDoc.getElementsByTagName("qry_Website_2");
for (i=0;i<x.length;i++)
{
document.write("<tr><td><strong>");
document.write(x[i].getElementsByTagName("dma_name")[0].childNodes[0].nodeValue);
document.write("</strong><tr><td>");
document.write(x[i].getElementsByTagName("theater_name")[0].childNodes[0].nodeValue);
document.write("<tr><td>");
document.write(x[i].getElementsByTagName("street_address1")[0].childNodes[0].nodeValue);
document.write("<tr><td>");
document.write(x[i].getElementsByTagName("street_city")[0].childNodes[0].nodeValue.concat(" , ")) ;
document.write(x[i].getElementsByTagName("street_state")[0].childNodes[0].nodeValue.concat(" "));
document.write(x[i].getElementsByTagName("street_zip_code")[0].childNodes[0].nodeValue);
document.write("<tr><td><a href='");
document.write(x[i].getElementsByTagName("Link")[0].childNodes[0].nodeValue) ;
document.write("'>Get Tickets!</a></td></tr>");
document.write("<tr><td>") ;
document.write("<tr><td>") ;
document.write("<tr><td>") ;
}
document.write("</table>");
</script>
</body></html>

Open in new window

0
Comment
Question by:springro
[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
8 Comments
 
LVL 4

Accepted Solution

by:
ronan1979 earned 2000 total points
ID: 33729536
if you run it on offline/local then it will fail : cannot send/received request because there is not server.

i run it on EasyPHP : and it works on FF, Chrome and safari

>> just put it  on a server <<
0
 
LVL 3

Expert Comment

by:wuff
ID: 33729758
Why haven't you an end tag to your comments in your <style> part?

<!--

-->
0
 
LVL 4

Author Comment

by:springro
ID: 33729940
Hi Ronan1979,

It does not work of the server.  Something is still not right.

0
Technology Partners: 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 4

Expert Comment

by:ronan1979
ID: 33733290
try this code - just remove incomplete html comments
I check on my computer, once I got it - and i will give you the code

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"><title>Jack Goes Boating Official Website</title>

<link href="styles2.css" rel="stylesheet" type="text/css" media="all">
<style type="text/css">
body {
margin: 0px;
margin-left: 10px;
padding: 0px;
background-color: #FFF;
text-decoration: none;
font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
}
a {
text-decoration: underline;
font-size: 12px;
color: #0093e3;
font-weight: bold;
}
strong {
text-decoration: none;
font-size: 22px;
color: #666;
font-weight: bold;
}
iframe {
padding: 0px;
height: 430px;
width: 530px;
border-top-width: 1px;
border-right-width: 0px;
border-bottom-width: 1px;
border-left-width: 0px;
border-top-style: solid;
border-right-style: none;
border-bottom-style: solid;
border-left-style: none;
border-bottom-color: #CCC;
border-top-color: #CCC;
margin: 0px;
}
</style>
</head><body>

<script type="text/javascript">if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.open("GET","jack.xml",false);
xmlhttp.send();
xmlDoc=xmlhttp.responseXML;
document.write("<table border='0'>");
var x=xmlDoc.getElementsByTagName("qry_Website_2");
for (i=0;i<x.length;i++)
{
document.write("<tr><td><strong>");
document.write(x[i].getElementsByTagName("dma_name")[0].childNodes[0].nodeValue);
document.write("</strong><tr><td>");
document.write(x[i].getElementsByTagName("theater_name")[0].childNodes[0].nodeValue);
document.write("<tr><td>");
document.write(x[i].getElementsByTagName("street_address1")[0].childNodes[0].nodeValue);
document.write("<tr><td>");
document.write(x[i].getElementsByTagName("street_city")[0].childNodes[0].nodeValue.concat(" , ")) ;
document.write(x[i].getElementsByTagName("street_state")[0].childNodes[0].nodeValue.concat(" "));
document.write(x[i].getElementsByTagName("street_zip_code")[0].childNodes[0].nodeValue);
document.write("<tr><td><a href='");
document.write(x[i].getElementsByTagName("Link")[0].childNodes[0].nodeValue) ;
document.write("'>Get Tickets!</a></td></tr>");
document.write("<tr><td>") ;
document.write("<tr><td>") ;
document.write("<tr><td>") ;
}
document.write("</table>");
</script>
</body></html>

Open in new window

0
 
LVL 4

Expert Comment

by:ronan1979
ID: 33738076
this code works on IE6, FF3.5.3, safari4.0.4, chrome 6.0

a.html
proof.png
0
 
LVL 4

Expert Comment

by:ronan1979
ID: 33738099
this code was tested on local server EasyPHP 2..0
0
 
LVL 23

Expert Comment

by:jeremyjared74
ID: 33766450
You can check your html and CSS online. There are some very helpful sites for this. I will link to a few. This way you can check them in the future also.

HTML SItes:
http://www.htmlfixer.com/htmlfixer/
http://fixmyhtml.com/
http://validator.w3.org/#validate_by_input
http://schneegans.de/sv/

CSS:
http://jigsaw.w3.org/css-validator/
http://instantcsscode.com/
http://flumpcakes.co.uk/css/optimiser/
0
 
LVL 5

Expert Comment

by:onemadeye
ID: 34937559
@springro:
I used XAMPP and also find blank page ??

But then I realised I havent include the file 'jack.xml' and now everything looks fine :)
0

Featured Post

Looking for a new Web Host?

Lunarpages' assortment of hosting products and solutions ensure a perfect fit for anyone looking to get their vision or products to market. Our award winning customer support and 30-day money back guarantee show the pride we take in being the industry's premier MSP.

Question has a verified solution.

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

FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.
This Micro Tutorial will demonstrate how nuggets on the Web are formatted by using Chrome Developer Tools. These tools would not only view the site's CSS but it can also modify it and save the CSS to use on your own site.
Suggested Courses

610 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