From suvdim at gmail.com Wed Apr 1 19:32:55 2009 From: suvdim at gmail.com (=?KOI8-R?B?5MnNwSDz1dfP0s/X?=) Date: Wed, 1 Apr 2009 21:32:55 +0400 Subject: [kupu-dev] custom how to interact with server from kupu-tool Message-ID: Hi! i'm trying to extend kupu for Plone. I have 2 questions. Maybe somebody could help me. 1) I've created a custom button and I have a tool for it. The tool shows a dialog-box that contains a form. The form includes a field which value should be equal to current data when that dialog-box is loaded. I have written a js-function that generates current data. I have no problem with calling this function on such events as "onclick", "onblur" and so on. But i have no idea how to call it "onload" event, because the dialog-box div have no tag "body", so i have no place to point actions for "onload" event. Any help will be appeciated. 2) The above mentioned diialog box contains a form with a search button and a div above it. When the search button is presses and the form is submitted i need to send form data to a py-file that should handle it and return the result to the div above the form. When the search button is presses and the form is submitted form data should be sent to a .py-file that makes a request to a database, handles received data and returns result to the div above the form. (an example how to make it with a php-file will greate for me too). I simply can't understand what methods (js-functions?) should i use to send data to file and return result without reloading the page. I tried to find it out it learning the image-manager code, but it's too difficult for me. Maybe somebody could point me a direction for the further search. Thank you! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://codespeak.net/pipermail/kupu-dev/attachments/20090401/458762cd/attachment.htm From gweis at gmx.at Fri Apr 24 06:23:12 2009 From: gweis at gmx.at (Gerhard Weis) Date: Fri, 24 Apr 2009 14:23:12 +1000 Subject: [kupu-dev] small js-bugfix in kupudrawers.js Message-ID: Hi, I experimented with kupu under Safari 4 (I know Safari is not supported.) and discovered a small bug. The result of importNode is not written back to the variable, and hence Safari throws a 'Wrong Document Exception'. In theory other DOM3 complant browsers shold throw this exception too. I attached a patch against http://codespeak.net/svn/kupu/trunk (rev. 64199). I discovered the problem in kupu release 1.4.12.1, but there is the same problem in trunk. Btw. Kupus javascript code seems seems to work fine in Safari 4, however there is a big problem with XSLT. cheers, Gerhard -------------- next part -------------- A non-text attachment was scrubbed... Name: kupudrawers.diff Type: application/octet-stream Size: 587 bytes Desc: not available Url : http://codespeak.net/pipermail/kupu-dev/attachments/20090424/a4dab09b/attachment.obj -------------- next part -------------- From gweis at gmx.at Fri Apr 24 07:00:13 2009 From: gweis at gmx.at (Gerhard Weis) Date: Fri, 24 Apr 2009 07:00:13 +0200 Subject: [kupu-dev] small js-bugfix in kupudrawers.js In-Reply-To: References: Message-ID: <20090424050013.303220@gmx.net> Sorry, the diff is against rev 64624. (I was in the wrong svn:external while retrieving the rev. number). cheers, Gerhard -- Psssst! Schon vom neuen GMX MultiMessenger geh?rt? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger01