Michael J.A. Clark
Michael Clark is a Computer Science student from England providing freelance programming and design when not studying at Cambridge. Skills: C#, Sitecore, PHP, XHTML, CSS, AS3, Java, ML, F#.

Sections

Contact details

Email
mjac@mjac.co.uk
Skype
mjacdotuk
Twitter
mjacuk

Updated graph generator and prime number utility

Updated graph generatorI spent all of Thursday evening upgrading my internet-based graph generator to plot functions that are parametric, polar and cartesian (with both x and y as subject); you can access and use this program through any browser that supports JavaScript, CSS and the DOM. After patching a few discrepancies with Microsoft Internet Explorer I now declare it fully functional in all modern internet browsers. I have really upped the usability with some clever DOM programming: adding and removing table rows and implementing dynamically generated list boxes for colours and function type has really increased the maintainability and ease-of-use.

Updated prime number utilityMy prime number utility has also been modified recently to use the JavaScript DOM model to generate rows of results instead of adding lines to a simple text-area (like a beginner). It then had to be patched to solve some ridiculous problems in Internet Explorer…

Problems with Internet Explorer

I have to moan a little about Internet Explorer as it caused me so much grief when trying to finish the application.

There is not any support for more obscure CSS colour names in Internet Explorer 6: among others ‘Grey’, the British spelling of ‘Gray’, and all derivatives (for instance ‘DarkGrey’) are not supported and show as white. I was really confused when I noticed some equations not displaying and initially blamed it on a problem with the Cartesian (y) equation setting; from now on I will accuse Internet Explorer before blaming myself and adhere to older web-standards regarding textual colour names.

Internet Explorer also decides to forget to render DOM changes leaving many <select> boxes empty or with a zero size. It did not like assigning the attribute class to any element through, through elem.setAttribute('class', 'test');, preferring instead the elem.className = 'test'; declaration — apparently class is a reserved word in JavaScript, why does that even matter?

Comments