Version: (using KDE Devel) Installed from: Compiled sources My providers's webmail uses submit code like the one below. That works eg in IE, but not with khtml/kjs. The error kjs error message is: Error: node : TypeError: Object [object INPUT] (result of expression this.document.s.submit) does not allow calls. <html> <body> <form action="something.php" name="s"> <input type="text" name="what" value=""> <input type="Hidden" name="submitAction" value=""> <a href="javascript:this.document.s.submitAction.value='Suchen';this.document.s.submitAction.name='submit';this.document.s.submit();">Action</a> </form> </body> </html>
I would consider this html/js as completly broken, neither Opera nor Firefox seem to support this, maybe this is IE only (did not test yet).
A variant of this problem is this: It does not work in Konqueror but it does in Firefox. <html> <body> <form action="something.php" name="searchForm"> <input type="text" name="what" value=""> <a href="#" onclick="document.forms['searchForm'].submit()">Search</a> </form> </body> </html> The problem is that Konqueror just goes to "#", and does not submit the form. This can be seen in the wild on http://www.tvgids.nl/ Searching on this important site currently does not work in Konqueror
Created attachment 11464 [details] testcase attached
SVN commit 426139 by carewolf: Hack from Webcore to behave like other browsers. BUG: 101340 M +22 -2 khtmlview.cpp --- trunk/KDE/kdelibs/khtml/khtmlview.cpp #426138:426139 @@ -3042,11 +3042,31 @@ button,0, _mouse, dblclick ); me->ref(); targetNode->dispatchEvent(me,exceptioncode,true); - if (me->defaultHandled() || me->defaultPrevented()) + bool defaultHandled = me->defaultHandled(); + if (defaultHandled || me->defaultPrevented()) swallowEvent = true; me->deref(); - if (eventId == EventImpl::MOUSEDOWN_EVENT) { + // Special case: If it's a click event, we also send the KHTML_CLICK or KHTML_DBLCLICK event. This is not part + // of the DOM specs, but is used for compatibility with the traditional onclick="" and ondblclick="" attributes, + // as there is no way to tell the difference between single & double clicks using DOM (only the click count is + // stored, which is not necessarily the same) + if (eventId == EventImpl::CLICK_EVENT) { + me = new MouseEventImpl(dblclick ? EventImpl::KHTML_ECMA_DBLCLICK_EVENT : EventImpl::KHTML_ECMA_CLICK_EVENT, + true,cancelable,m_part->xmlDocImpl()->defaultView(), + detail,screenX,screenY,clientX,clientY,pageX,pageY, + ctrlKey,altKey,shiftKey,metaKey, + button,0, _mouse, dblclick); + + me->ref(); + if (defaultHandled) + me->setDefaultHandled(); + targetNode->dispatchEvent(me,exceptioncode,true); + if (me->defaultHandled() || me->defaultPrevented()) + swallowEvent = true; + me->deref(); + } + else if (eventId == EventImpl::MOUSEDOWN_EVENT) { // Focus should be shifted on mouse down, not on a click. -dwh // Blur current focus node when a link/button is clicked; this // is expected by some sites that rely on onChange handlers running
Don't see how the fix relates to the original request -- it only relates to comment #2. Jowenn: a bit more of the html may be relevant. In particular, does the form have an element by the name of submit?
Created attachment 13204 [details] Bricklink order form Another form where it's impossible to submit your selection. Doesn't work in Konqueror 3.4.92, however it DID work in 3.4.0 and works fine in Firefox and other browsers.
Please do not add in unrelated bug reports like that, but rather file a separate report. (In fact, your issue is likely a parser bug, but it needs reduction; but it's entirely unrelated to this)
Works fine with 3.5.6, can this report be closed?
Does not work in KDE 4, try this page: http://pouet.net/prodlist.php
Re: comment #9 --- please see my comment #7
Closing as fixed as of comment #7 and comment #8. If you still thing this issue is valid for Konqueror 4.8.4 or later, please file a new report. Thanks for your understanding.