Solved

html(xhtml)/javascripts behave different between browsers

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
function parameter and using that as array 15 23
.htaccess css/images no longer loading 4 38
jQuery force form POST 7 48
Need HTML output in powershell line by line 3 28
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
Find out what you should include to make the best professional email signature for your organization.
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

828 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