[Zope] Re: anyone heard of Zamasing?
Tim Nash wrote: find a way to upload the zexp to the wiki but I don't see how to do You're absolutely right, I forgot we restricted this to authenticated users when junk uploads became a problem. I did the upload and changed the link. Contact me for a wiki.zope.org login so you can do more uploads, or you may prefer to just link to your site. Thanks for sharing this example! ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] AJAX / HTML Fragment
I'm writing my website to use AJAX for form posting and displaying content, and instead of using AJAX to parse XML and then update the DOM, I'm using Zope to create an HTML fragment and AJAX just writes it to the correct location on the page. It works really great for what I'm doing, but the only problem is that I get an error message: "Error: no element found Source File: http://myzopesite:8080/mywebsite/zz/NewNote Line: 1" NewNote is the location of the Python script which just posts the content to a database (it actually execs a stored procedure)... If I set the zsql query to "select 1 as true" at the end, that makes the error go away. That leads me to believe something in the javascript is wrong, so here's the relevant part of the javascript: $.post('NewNote',{py_projectid: projectid,py_who: userName,py_note: note}, function() { // it saved. update display $('#theNotes').load('AJX_ListNotes?projectid='+ projectid); } It is using jQuery, but I had it setup before as just a plain javascript, but I still had the same problem. So, why would I get a "No element found" on a POST query? Here is the content of the python script. It's as basic as you can get: return container.addnote(projectid=py_projectid, who=py_who, note=py_note) That is the only thing which expect a return value. If I change that to this: container.addnote(projectid=py_projectid, who=py_who, note=py_note) return 1 I don't get any error messages, but the "update display" never happens. So, I'd like to have no error messages, and I'd also like not having to pollute my zsql queries with stupid things like "select 1 as true". Any ideas on how to accomplish that? -- Thanks, Derek Wilson ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] AJAX / HTML Fragment
On Mon, Apr 21, 2008 at 8:17 PM, SpiderX <[EMAIL PROTECTED]> wrote: > I'm writing my website to use AJAX for form posting and displaying content, > and instead of using AJAX to parse XML and then update the DOM, I'm using > Zope to create an HTML fragment and AJAX just writes it to the correct > location on the page. It works really great for what I'm doing, but the only > problem is that I get an error message: > > "Error: no element found > Source File: http://myzopesite:8080/mywebsite/zz/NewNote > Line: 1" Use Firefox and Firebug or LiveHTTPHeaders to see exactly what is going over the wire; you can also use command line tools like curl to recreate the request to debug what is going on on the zope and browser sides. Zope itself has very little to do with Javascript; once it serves the JS all the requests look the same to Zope regardless of how they were generated. -- Martijn Pieters ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Re: anyone heard of Zamasing?
The tecnique showed by Tim is the same I use at Zope Smart Manager but I prefer prototype and scriptaculous. At this time the most active community is, perhaps, RoR and they use the same libraries And when I use a Zope manage page like the constructor of a product I use ModalBox to show it as a dialog box I like to put in ZSM a drag and drop option to sort the ordered folder objects, to launch the creation dialog and delete object to a trash (I need scriptaculous for things like this) It's amazing what you can do with AJAX! (prototype is the library used) I don't want to program anything else like a desktop program (in fact I believe that the next desktop will be a http server) 2008/4/21, Simon Michael <[EMAIL PROTECTED]>: > > Tim Nash wrote: > > > find a way to upload the zexp to the wiki but I don't see how to do > > > > You're absolutely right, I forgot we restricted this to authenticated > users when junk uploads became a problem. I did the upload and changed the > link. Contact me for a wiki.zope.org login so you can do more uploads, or > you may prefer to just link to your site. > > Thanks for sharing this example! > > ___ > Zope maillist - Zope@zope.org > http://mail.zope.org/mailman/listinfo/zope > ** No cross posts or HTML encoding! ** > (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce > http://mail.zope.org/mailman/listinfo/zope-dev ) > -- Mis Cosas http://blogs.sistes.net/Garito Zope Smart Manager http://blogs.sistes.net/Garito/670 ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )