?
Solved

html(xhtml)/javascripts behave different between browsers

Posted on 2010-11-16
3
Medium Priority
?
290 Views
Last Modified: 2012-05-10

I have a web-application with javascripts it behaves differeent between IE and fireFox.
This one works on fireFox but not on internet explorer (IE)

http://cs330.blueearthconnections.org/Ze/Assignment_03/fractal_online.html

You can play with it by entering  0  0   300  300;  beta: 0.3 ;  angle: 35 ;
level of recursion: 4; color: red  ;   It suppose to draw a tree

But this one with slight modification works on both IE and fireFOX browers

http://cs330.blueearthconnections.org/Rochelle/Fractal.html

Experts, could you help me explain the difference? Obviously I hope it works  trasparently across all broswers.

Thanks
0
Comment
Question by:zzhang2006
[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
3 Comments
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 34152889
The major browsers each have their own implementation of javascript and each one is slightly different.  The major families are IE (internet Explorer), Firefox/Mozilla, and Webkit which is used by Safari and Chrome.

http://cs330.blueearthconnections.org/Rochelle/Fractal.html is not working in Firefox.  The Error Console says that "levelInput is Null".
0
 
LVL 13

Accepted Solution

by:
dsmile earned 500 total points
ID: 34152899
I don't know what exactly problem is, but I think DOCTYPE prevents your code from working.

Remove this line from your page and you'll see it work

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

If you want to keep this DOCTYPE declare then I suggest you to dig deeper into this cause, or just simply remove it
0
 
LVL 1

Author Closing Comment

by:zzhang2006
ID: 34156600
Removing the DOCTYPE solved the problem, at least for the two broswers. Thanks
0

Featured Post

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

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

When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Suggested Courses

765 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