Created attachment 53053 [details] HTML including the JS-code + Button that starts the methode after I tried to write a funtion to draw any (konvex) form (using rotation of divs with overflow: hidden), I got the error-message (in the error-console)you can find in the summary of this post. I used Google Chrome 4.1.249.1045 (carn't find the WebKit version it uses). The nighly build r57179 with safari returns the error saying my methode (called "form()") doesn't even is a function ("forms.html:32 TypeError: Result of expression 'form' [null] is not a function.") o.O I don't get any other errors, that could let me know, my function is invalid (JSLint validates it (exept of telling me document.write() can be a form of eval <.<)) I don't say that my function is perfect and SHOULD work, but it doesn't work and tells me, that the JSCore of the WebKit used in Chrome has a bug (I guess). If this infact is a bug only in Google Chrome, and not WebKit (while safari also don't tell me the real reason why it don't works), I'm sorry I wasted you your time (if I did) For the html-file including the JS-code that caused the error see the attachment.
There are two mistakes here that prevent the code from running: 1) script type="text/js" is not a registered type, so browsers don't think it's JavaScript, and simply ignore the content. 2) "form" in onclick handler means a property of the element - and HTMLInputElement.form refers to a form that contains it. Since there is no form around it, the property is null. It works (fails) in exactly the same way in Firefox. Please don't file bugs about code that doesn't work in any browser. There are better places to ask for general help with web development.