Bug 71363 - [test case] Javascript not handling 'value' property of a input of type text
Summary: [test case] Javascript not handling 'value' property of a input of type text
Status: RESOLVED NOT A BUG
Alias: None
Product: konqueror
Classification: Applications
Component: khtml ecma (show other bugs)
Version: 4.0
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-28 15:38 UTC by Albert Astals Cid
Modified: 2013-08-01 22:27 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Test case (520 bytes, text/html)
2003-12-28 15:39 UTC, Albert Astals Cid
Details
Now it works (546 bytes, text/html)
2003-12-28 15:58 UTC, Albert Astals Cid
Details
test case that works with konq 3.2 (521 bytes, image/gif)
2004-01-26 18:00 UTC, Stephan Kulow
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Albert Astals Cid 2003-12-28 15:38:55 UTC
Version:           4.0 (using KDE 3.1.94 (CVS >= 20031206), compiled sources)
Compiler:          gcc version 3.3.1 (Mandrake Linux 9.2 3.3.1-2mdk)
OS:          Linux (i686) release 2.4.22-21mdk

The test case works in Konqueror 3.1.4 but not in 3.1.94.
Comment 1 Albert Astals Cid 2003-12-28 15:39:28 UTC
Created attachment 3860 [details]
Test case
Comment 2 Albert Astals Cid 2003-12-28 15:58:15 UTC
Created attachment 3861 [details]
Now it works

Maybe it was my fault at the javascript code. Now it works. It still is a
regression, but maybe a 'good' regression. If you think the bug has to be close
feel free to do it.
Comment 3 Stephan Kulow 2003-12-28 18:24:52 UTC
I kind of doubt that the first test case works in IE, but I won't reboot
Comment 4 Stephan Kulow 2004-01-12 13:19:45 UTC
your #1 works in IE but it doesn't work in mozilla, so I'm not suprised
Comment 5 Stephan Kulow 2004-01-26 18:00:57 UTC
Created attachment 4363 [details]
test case that works with konq 3.2 

this is a fun bug: it works with konqueror 3.2, but neither with mozilla nor IE
Comment 6 David Faure 2004-01-26 20:00:06 UTC
OK #5 is because "window.what" works. It shouldn't. 
I think window.<name> is only for images, forms and applets, just like document.<name>. I'm working on a patch.
Comment 7 David Faure 2004-01-27 01:28:00 UTC
OK, back to #1, the conclusion is that on IE, calling the input element
by name only works when the input field isn't in a form. Kind of a
"toplevel" field (those inside a form being accessible via
formname.inputname).

Can someone check in IE what this code shows?

function search() {
  if (this.what) alert("this.what exists. this="+this);
  if (window.what) alert("window.what exists");
  if (document.what) alert("document.what exists");
  alert("document.forms.length="+document.forms.length);
  if (document.forms[0].what) alert("document.forms[0].what exists");
}
Comment 8 Stephan Kulow 2004-01-27 08:45:06 UTC
this.what exists. this=[object]
window.what exists
document.forms.length=0
Comment 9 Albert Astals Cid 2013-08-01 22:27:00 UTC
Since testcase 1 does not work in firefox nor on chromium we'll assume my javascript in 2003 was worse than the one it is 10 years later, and its hard :D