From: Mike Taylor Date: Tue, 28 Jan 2014 17:25:19 +0000 (+0000) Subject: Towards multiple search forms. X-Git-Tag: 1.0.0~1577 X-Git-Url: http://git.indexdata.com/?p=mkws-moved-to-github.git;a=commitdiff_plain;h=e1910c1453642bea8ffad32e3e1a4e52f1ecf8eb;hp=7643e4fb8b3a2db9bde104a753a64536f39dd71e Towards multiple search forms. Jeez, this is painful. Browser JavaScript must be the world development environment since the batch-processing systems of the early 1970s. Every error is diagnosed by silent no-opping. --- diff --git a/tools/htdocs/mkws.js b/tools/htdocs/mkws.js index f3473c8..b5dc51d 100644 --- a/tools/htdocs/mkws.js +++ b/tools/htdocs/mkws.js @@ -404,7 +404,14 @@ function _make_mkws_team($, teamName) { // wait until the DOM is ready function domReady () { - document.mkwsSearchForm.onsubmit = onFormSubmitEventHandler; + $('.mkwsSearchForm').each(function (i, obj) { + var node = this; + debug("adding class 'foo' to node " + node); + mkws.handle_node_with_team(node, function(tname) { + $(node).submit(onFormSubmitEventHandler); + }); + }); + document.mkwsSearchForm.mkwsQuery.value = ''; if (document.mkwsSelect) { if (document.mkwsSelect.mkwsSort)