Solved

html(xhtml)/javascripts behave different between browsers

Posted on 2010-11-16
3
285 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 83

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 125 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

896 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

12 Experts available now in Live!

Get 1:1 Help Now