Version: 3.5 (using KDE 3.5.0, compiled sources) Compiler: gcc version 3.4.3 OS: Linux (i686) release 2.6.7 The subject alone sounds stupid, but please see the following: In our company we use a Web-based bug-tracking system, which sends a page (which works fine on IE and Firefox) which contains the following (I have extracted a small test example): The code first sets the name of a field to null, and in the second line it tries to access the same field (which now - one could think - has no longer a name). In fact that is what konqueror tells me: the field is unknown. Interesting is, that the same code works on IE and firefox. (firefox shows in f1 an empty string, and in f2 "hugo") So it seems, they somehow handle the change to a fieldname differently. I have no idea how this is wrt the JavaScript specification, but in fact it hinders me to use konqueror for this application, which is a pitty. <html> <body> <form> <input name="f1" value=""> <input name="f2" value=""> <input type="hidden" name="proxyRender" value=""> <script type="text/javascript"> document.forms[0].proxyRender.name = null; document.forms[0].f1.value = document.forms[0].proxyRender.name; document.forms[0].proxyRender.name = "hugo"; document.forms[0].f2.value = document.forms[0].proxyRender.name; </script> </form> </body> </html>
I've actually spoken to mozilla developers about this issue (it came up in an another site), and they told me it's a bug in their browser. I haven't yet came up with a nice way of emulating that, though
I'd say that, after you set the name to null, proxyRender no longer exists. You may be able to access the element using the DOM hierarchy, but probably not by name/id -- after all, you told us there is no name. Besides, if Mozilla devs consider this a bug, then they will most likely fix it, meaning your website will cease working. I recommend you fix your website.
On Saturday 24 December 2005 02:42, Thiago Macieira wrote: > Besides, if Mozilla devs consider this a bug, then they will most likely > fix it, meaning your website will cease working. I recommend you fix your > website. I do understand this, and I would fix the Server if I could. But the software producing this page is a commercial product (MKS Integrity manager) :-( where we do not have the sourcecode ... The problem - as usual - is: On Windows (IE) it works (and I simply assume the company MKS did not do any tests beside with IE) Also, as everyone in our company - except me - is using Windoze, you can imagine how easy it is for me to have good arguments ...
Almost looks like IE and mozilla didn't do proper cleaning. What if you did some sort of pointer like trick? if they change the name field, we just point at the old one. of course only have 2 maximum. original, and current. of course I'd have it flag it as a warning at the very least, but not a critical error. I'd like to know what those developers were thinking....
bug confirmed even on KDE 4 (tested on revision 794646)
Seems to work in KDE 4.8.0. KHTML now produces the same result as opera and firefox and no longer gives an error