Why this cant be displayed in firefox?

This is a discussion on "Why this cant be displayed in firefox?" within the JavaScript Forum section. This forum, and the thread "Why this cant be displayed in firefox? are both part of the Program Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Dec 15th, 2007, 01:33
Up'n'Coming Member
Join Date: Oct 2007
Location: room
Age: 18
Posts: 75
Thanks: 0
Thanked 0 Times in 0 Posts
Red face Why this cant be displayed in firefox?

Hey hey!

I have just been making a new design for my mini site.
When I was testing it i found that the important content could not be displayed in firefox :o
Code: Select all
http://blizma.co.uk/new/
Have I dont something wrong in the source?
I have no idea =S. Most of its script is the same as the current website.

Thank you in advanced!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Dec 15th, 2007, 02:44
Highly Reputable Member
Join Date: Sep 2007
Age: 15
Posts: 717
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Why this cant be displayed in firefox?

Well, your source code is the following, correct?
HTML: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
	<title>asdf</title>

	<!-- Contents -->
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
	<meta http-equiv="Content-Language" content="en" />
	<meta http-equiv="last-modified" content="15/12/2007 01:06:25" />
	<meta http-equiv="Content-Type-Script" content="text/javascript" />
	<meta name="description" content="" />
	<meta name="keywords" content="" />

	<!-- Others -->
	

	<!-- Parent -->
	<link rel="sitemap" href="imsitemap.html" title="General Site Map" />

	<!-- Res -->
	<script type="text/javascript" src="res/x5engine.js"></script>
	<link rel="stylesheet" type="text/css" href="res/styles.css" media="screen, print" />
	<link rel="stylesheet" type="text/css" href="res/template.css" media="screen" />
	<link rel="stylesheet" type="text/css" href="res/print.css" media="print" />
	<!--[if lt IE 7]><link rel="stylesheet" type="text/css" href="res/iebehavior.css" media="screen" /><![endif]-->
	<link rel="stylesheet" type="text/css" href="res/home.css" media="screen, print" />
	<link rel="stylesheet" type="text/css" href="res/handheld.css" media="handheld" />
	<link rel="alternate stylesheet" title="High contrast - Accessibility" type="text/css" href="res/accessibility.css" media="screen" />

	<!-- Robots --> 	<meta http-equiv="Expires" content="0" />
	<meta name="Resource-Type" content="document" />
	<meta name="Distribution" content="global" />
	<meta name="Robots" content="index, follow" />
	<meta name="Revisit-After" content="21 days" />
	<meta name="Rating" content="general" />
</head>
<body>
<script language="JavaScript" type="text/javascript">
m='%3Cscript%20language%3DJavaScript%3E%3C%21--%0D%0A%0D%0Avar%20message%3D%22Function%20Disabled%21%22%3B%0D%0A%0D%0Afunction%20clickIE%28%29%20%20%7Bif%20%28document.all%29%20%7Balert%28message%29%3Breturn%20false%3B%7D%7D%0D%0Afunction%20clickNS%28e%29%20%7Bif%20%0D%0A%28document.layers%7C%7C%28document.getElementById%26%26%21document.all%29%29%20%7B%0D%0Aif%20%28e.which%3D%3D2%7C%7Ce.which%3D%3D3%29%20%7Balert%28message%29%3Breturn%20false%3B%7D%7D%7D%0D%0Aif%20%28document.layers%29%20%0D%0A%7Bdocument.captureEvents%28Event.MOUSEDOWN%29%3Bdocument.onmousedown%3DclickNS%3B%7D%0D%0Aelse%7Bdocument.onmouseup%3DclickNS%3Bdocument.oncontextmenu%3DclickIE%3B%7D%0D%0A%0D%0Adocument.oncontextmenu%3Dnew%20Function%28%22return%20false%22%29%0D%0A%0D%0A//%20--%3E%3C/script%3E';d=unescape(m);document.write(d);
</script>
<div id="imSite">
<div id="imHeader">
	<h1>asdf</h1>
</div>
<div class="imInvisible">
<hr />
<a href="#imGoToCont" title="Skip the main menu">Go to content</a>
<a name="imGoToMenu"></a>
</div>
<div id="imBody">
	<div id="imMenuMain">

<!-- Menu Content START -->
<p class="imInvisible">Main menu:</p>
<div id="imMnMn">
<ul>
	<li><a class="imMnItm_1" href="index.html" title=""><span class="imHidden">Home Page</span></a></li>
</ul>
</div>
<script type="text/javascript">imPreloadImages('immnu_01b.gif')</script>
<!-- Menu Content END -->

	</div>
<hr class="imInvisible" />
<a name="imGoToCont"></a>
	<div id="imContent">
<!-- Page Content START -->
<div id="imToolTip"></div>
<div id="imPage">

<div id="imCel7_00">
<div id="imCel7_00_Cont">
	<div id="imObj7_00">
<script type="text/javascript">

search='<input type="radio" name="searchType" id="mp3s" value="mp3s" CHECKED> <b>MP3 Music<\/b> <input type="radio" name="searchType" id="mp3s2" value="mp3s2"> Mp3 Attempt 2 <input type="radio" name="searchType" id="fmovie" value="fmovie"> Stream Movies <input type="radio" name="searchtype" id="tvmovie" value="tvmovie"> Stream Tv Eps. <input type="radio" name="searchType" id="pdf" value="pdf"> PDF Documents <input type="radio" name="searchType" id="ebook" value="ebook"> eBooks<\/div>';

phaze='<input type="radio" name="searchType" id="intext" value="intext" CHECKED> <b>Attempt One<\/b> <input type="radio" name="searchType" id="rslinks" value="rslinks"> Attempt Two <input type="radio" name="searchType" id="phaze" value="phaze"> Programs <input type="radio" name="searchType" id="torrents" value="torrents"> Torrents';

news='<input type="radio" name="searchType" id="googlenews" value="googlenews" CHECKED> Google News\r\n<input type="radio" name="searchType" id="bbc" value="bbc"> BBC <input type="radio" name="searchType" id="ap" value="ap"> AP <input type="radio" name="searchType" id="reuters" value="reuters"> Reuters <input type="radio" name="searchType" id="wired" value="wired"> Wired';

video='<input type="radio" name="searchType" id="allvids" value="allvids" CHECKED><b> All <\/b> <input type="radio" name="searchType" id="googlevideo" value="googlevideo"> Google Video\r\n<input type="radio" name="searchType" id="youtube" value="youtube"> Youtube\r\n<input type="radio" name="searchType" id="metacafe" value="metacafe"> MetaCafe\r\n<input type="radio" name="searchType" id="archieve" value="archive"> Archive.org';

developers='<input type="radio" name="searchType" id="codebase" value="codebase" CHECKED> Codebase <input type="radio" name="searchType" id="oreilly" value="oreilly"> Oreilly <input type="radio" name="searchType" id="koders" value="koders"> Coders <input type="radio" name="searchType" id="codefetch" value="codefetch"> Codefetch <input type="radio" name="searchType" id="phpdocs" value="phpdocs"> PHP Docs<\/a>';

education='<input type="radio" name="searchType" id="wikipedia" value="wikipedia" CHECKED> Wikipedia\r\n<input type="radio" name="searchType" id"askcom" value="askcom"> Ask.com \r\n<input type="radio" name="searchType" id="citeseer" value="citeseer"> Citeseer<input type="radio" name="searchType" id="googlescholar" value="googlescholar"> Google Scholar\r\n<input type="radio" name="searchType" id="googleansweres" value="googleanswers"> Google Answers<input type="radio" name="searchType" id="answeres" value="answers"> Answers.com\r\n<input type="radio" name="searchType" id="yahooansweres" value="yahooanswers"> Yahoo Answers';

lectures='<input type="radio" name="searchType" id="alevel" value="alevel" CHECKED><b> A/AS/O Level Lectures <\/b> <input type="radio" name="searchType" id="univ" value="univ"> University Lectures \r\n';
function foo(x){
heh.innerHTML=x;
document.tehmonkey.search.focus();
}
</script>

    <div id="foo">
      Search: <a href="javascript:foo(search)">General</a> | <a href="javascript:foo(phaze)">Download Stuff</a> | <a href="javascript:foo(lectures)">Revision</a> | <a href="javascript:foo(education)">Education</a> | <a href=
      "javascript:foo(video)">Vids</a> | <a href="javascript:foo(news)">News</a> | <a href=
      "javascript:foo(developers)">Developers</a> |            
    </div>
    <form name="tehmonkey" style="margin:-10 0 5 10" id="tehmonkey" action=
    "monstersearchmachine.php" method="post" target="_blank">
      <br>

      <input type="text" name="searchTerm" id="searchTerm" maxlength='60' size='45' value="">
      <input type="submit" value="modified google search" STYLE="border-color:#888888;background:#FFF;border-style:solid;border-width:1px"><br>
      <br>

      <div id="heh"></div><script type="text/javascript">
foo(search);
</script>
    </form>
  </center>
	</div>
</div>
</div>

</div>
<p id="imFooterSiteMap"><a href="index.html" title="">Home Page</a> | <a href="imsitemap.html" title="General Site Map">Site Map</a></p>
<!-- Page Content END -->

	</div>
	<div id="imFooter">
		<hr class="imInvisible" />
		<span id="imFooter_L"></span>
		<span id="imFooter_R"></span>
		<br class="imClear" />
	</div>
</div>
</div>
<div class="imInvisible">
<hr />
<a href="#imGoToCont" title="Read this page again">Back to content</a> | <a href="#imGoToMenu" title="Read this page again">Back to main menu</a>
</div>

<div id="imZIBackg" onclick="imZIHide()" onkeypress="imZIHide()"></div>
</body>
</html>
There's not much content there...
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Dec 15th, 2007, 07:15
Reputable Member
Join Date: Nov 2007
Location: India
Posts: 150
Blog Entries: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Why this cant be displayed in firefox?

I think the encrypted HTML is the problem. BTW I am not sure if phone browsers support JS. Mine Nokia 3110c in India does not seep to support JS.
Last Blog Entry: Cross browser nuisance (Feb 11th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Dec 15th, 2007, 12:18
Up'n'Coming Member
Join Date: Oct 2007
Location: room
Age: 18
Posts: 75
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Why this cant be displayed in firefox?

Well... what can i do? =S
I took the encrypted content out and it still doesnt work =[
Any suggestions?
Or maybe, does it work for you guys, and just not me? :S
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Dec 15th, 2007, 16:46
Highly Reputable Member
Join Date: Sep 2007
Age: 15
Posts: 717
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Why this cant be displayed in firefox?

Can you post a screen shot? From your source, as I said above, I don't see a lot of content. If you post a screen shot we'll be able to see what you mean.
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Dec 15th, 2007, 18:40
Up'n'Coming Member
Join Date: Oct 2007
Location: room
Age: 18
Posts: 75
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Why this cant be displayed in firefox?

Ok..

here are two screenshots (one of IE one of FireFox ---->

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old Dec 15th, 2007, 19:07
Most Reputable Member
Join Date: May 2007
Location: UK
Age: 27
Posts: 1,111
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Why this cant be displayed in firefox?

*sigh*

Validate your code before you blame the browser. You have 144 XHTML errors.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old Dec 15th, 2007, 22:11
Highly Reputable Member
Join Date: Sep 2007
Age: 15
Posts: 717
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Why this cant be displayed in firefox?

*sigh* again!

Yes, the validation is important!

Now, the reason you're not seeing the radio buttons is your javascript. You did not correctly define variables. I fixed your code:
Code: Select all
<script type="text/javascript">

var search='<input type="radio" name="searchType" id="mp3s" value="mp3s" CHECKED> <b>MP3 Music<\/b> <input type="radio" name="searchType" id="mp3s2" value="mp3s2"> Mp3 Attempt 2 <input type="radio" name="searchType" id="fmovie" value="fmovie"> Stream Movies <input type="radio" name="searchtype" id="tvmovie" value="tvmovie"> Stream Tv Eps. <input type="radio" name="searchType" id="pdf" value="pdf"> PDF Documents <input type="radio" name="searchType" id="ebook" value="ebook"> eBooks</div>';

var phaze='<input type="radio" name="searchType" id="intext" value="intext" CHECKED> <b>Attempt One<\/b> <input type="radio" name="searchType" id="rslinks" value="rslinks"> Attempt Two <input type="radio" name="searchType" id="phaze" value="phaze"> Programs <input type="radio" name="searchType" id="torrents" value="torrents"> Torrents';

var news='<input type="radio" name="searchType" id="googlenews" value="googlenews" CHECKED> Google News\r\n<input type="radio" name="searchType" id="bbc" value="bbc"> BBC <input type="radio" name="searchType" id="ap" value="ap"> AP <input type="radio" name="searchType" id="reuters" value="reuters"> Reuters <input type="radio" name="searchType" id="wired" value="wired"> Wired';

var video='<input type="radio" name="searchType" id="allvids" value="allvids" CHECKED><b> All <\/b> <input type="radio" name="searchType" id="googlevideo" value="googlevideo"> Google Video\r\n<input type="radio" name="searchType" id="youtube" value="youtube"> Youtube\r\n<input type="radio" name="searchType" id="metacafe" value="metacafe"> MetaCafe\r\n<input type="radio" name="searchType" id="archieve" value="archive"> Archive.org';

var developers='<input type="radio" name="searchType" id="codebase" value="codebase" CHECKED> Codebase <input type="radio" name="searchType" id="oreilly" value="oreilly"> Oreilly <input type="radio" name="searchType" id="koders" value="koders"> Coders <input type="radio" name="searchType" id="codefetch" value="codefetch"> Codefetch <input type="radio" name="searchType" id="phpdocs" value="phpdocs"> PHP Docs<\/a>';

var education='<input type="radio" name="searchType" id="wikipedia" value="wikipedia" CHECKED> Wikipedia\r\n<input type="radio" name="searchType" id"askcom" value="askcom"> Ask.com \r\n<input type="radio" name="searchType" id="citeseer" value="citeseer"> Citeseer<input type="radio" name="searchType" id="googlescholar" value="googlescholar"> Google Scholar\r\n<input type="radio" name="searchType" id="googleansweres" value="googleanswers"> Google Answers<input type="radio" name="searchType" id="answeres" value="answers"> Answers.com\r\n<input type="radio" name="searchType" id="yahooansweres" value="yahooanswers"> Yahoo Answers';

var lectures='<input type="radio" name="searchType" id="alevel" value="alevel" CHECKED><b> A/AS/O Level Lectures <\/b> <input type="radio" name="searchType" id="univ" value="univ"> University Lectures \r\n';

function foo(x){
heh.innerHTML=x;
document.tehmonkey.search.focus();
}
</script>
That should fix the display error. However, you still need to validate!
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9  
Old Dec 16th, 2007, 01:45
Up'n'Coming Member
Join Date: Oct 2007
Location: room
Age: 18
Posts: 75
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Why this cant be displayed in firefox?

Hey.
Thanks for replies.
I am aware that there are a few tiny errors. I don't believe this can affect this.. looking through the error report, there are no mager errors..

swagner thanks for that. However it hasn't solved it.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #10  
Old Dec 16th, 2007, 08:56
Most Reputable Member
Join Date: May 2007
Location: UK
Age: 27
Posts: 1,111
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Why this cant be displayed in firefox?

Quote:
Originally Posted by jahphill View Post
I am aware that there are a few tiny errors. I don't believe this can affect this.. looking through the error report, there are no mager errors..
As I often say: invalid code causes unpredictable results.

Your code errors may or may not be the cause of your problem. But eliminating them is the logical first step in debugging your code. When you go bug-hunting, it pays to be systematic!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #11  
Old Dec 16th, 2007, 14:29
Highly Reputable Member
Join Date: Sep 2007
Age: 15
Posts: 717
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Why this cant be displayed in firefox?

Mike is, as usual, correct. Your javascript, and your whole site for that matter, is being screwed up by invalid code. Please validate your code, then we can work on the javascript further. If you need help with correcting validation errors I'm happy to help.
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #12  
Old Dec 16th, 2007, 16:38
Most Reputable Member
Join Date: May 2007
Location: UK
Age: 27
Posts: 1,111
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Why this cant be displayed in firefox?

Here's another problem with your code:

innerHTML is not a W3C standard. It's very buggy in Gecko browsers (e.g. Firefox).

Don't use it. Use the DOM instead. Unfortunately the DOM is slower, and takes more code to write, but it's still the better choice.

This article has a lot of detail about innerHTML.

Last edited by MikeHopley; Dec 16th, 2007 at 16:41.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply