Random ...
June 2018
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
Tags ...

python+zope++:: Ajax and zope, round 2
Posted at 07.May,2006 21:53  Comments 5 / Trackbacks 0 / Like this post!
Technorati tag(s):

I've looked at DataRequestor.js and jsolait previously.

In one of the comments, d2m suggested that I look at mini by tim morgan

I've set up a demo, following what I did with DataRequestor.js and jsolait. However, there's an extra example.

There's no easy way to update elements with post data using DataRequestor.js or jsolait. Most are due to my ignorance, probably.

However, with mini, I can do that easily.

  • add the necessary in the head:
          <script type="text/javascript" src="ajax.js"></script>
  • add the form elements:
          <form onsubmit="ajax.submit('thescript','theelement',this);return false;)>
           ..... form fields ....
          <input type="submit">
  • add the element:
         <div id="theelement">
             this will be replaced by the form data

That's it, we're done.

Bookmark and Share

Is this entry helpful? Comments/Donate/Click some google ads.  
Trackback is http://myzope.kedai.com.my/blogs/kedai/78/tbping 



I like this note and the former one about ajax+zope. Just one question... how should the "getAll" script be? I think that's the one you call from ajax.submit...


jm  at 24.Sep,2006 17:35
here it is

nothing special about getAll. it's a script (python) with these:


name = r.form['username']
age = r.form['age']
comments = r.form['comments']

print """
hi %s! You're %s and has something to say:
%s""" % (name,age,comments)

return printed

kedai  at 25.Sep,2006 08:04
Access denied in zope

Hi kedai, I hope you can help me.

I always get an "access denied javascript error" when executing the "OnClick" method. I used both DTML Document and Page Template, but always get the same error.

The problem is in zope, I´m sure about it, because out of zope (in my local computer) it works perfectly.

I tried everithing. Setting more permissions to the objects has no results.

I´m really stuck. All ajax libraries I used in zope returns the same error.

My version of zope is 2.8.5


PD: Sorry for my english and thanks from Spain.

Axier Garcia  at 09.Oct,2006 07:41
more info

needed to see whether the problem was from zope or something else.

I've never encountered such problem, and i'm running a version of zope that's much older than 2.8.5

kedai  at 10.Oct,2006 13:06
javascript and not the form

can i submit the same form using javascript and not by clicking the submit button.I mean i'll call ajavascript that submits the form.

Please reply its urgent

Gaurav kashyap  at 09.Jun,2009 14:28
Post a comment