Solved

html(xhtml)/javascripts behave different between browsers

Posted on 2010-11-16
3
282 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
3 Comments
 
LVL 82

Expert Comment

by:Dave Baldwin
Comment Utility
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 125 total points
Comment Utility
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
Comment Utility
Removing the DOCTYPE solved the problem, at least for the two broswers. Thanks
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Summernote and form validation 10 38
Menu Inconsistent 3 18
What does this javascript do? 7 23
Calculate days between two dates 7 34
Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
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)

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now