[google-appengine] Re: $.ajax(appEngineURL with jsonp options) gets unique ID appended to the URL

2012-05-04 Thread rcp
that worked. thank you!


On Friday, May 4, 2012 6:36:50 PM UTC-7, rcp wrote:

 Can I make this unique ID go away? Why is it being added? (chrome is the 
 browser and I am entering the .js code in the chrome debugger)

 The app engine log shows:

 $.ajax(url-with-options)  sent to jsonengine instance gets 
 *012-05-04 13:08:22.481 /_je/notes?_docType=messages.asc_=1336162102183*
 in the app engine log. My options are: type: GET, dataType: jsonp, 
 jsonp: false, processData: false,
  
 url (*http://my_stuff.appspot.com/_je/notes?docType=_messages.asc*) 
 entered in browser returns the content I want from app engine

 thoughts / instruction appreciated.




-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/PNLN7Baoio4J.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: Ajax / Phyton / What mistake am I doing?

2011-11-29 Thread voscausa
See static serving :  
http://stackoverflow.com/questions/5693976/serving-static-html-in-google-app-engine-python
 if 
you do not use a handler.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/I-3trpdZsjgJ.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: Ajax

2011-09-29 Thread Max
Now I have this error:

File 
/base/python_runtime/python_lib/versions/third_party/django-0.96/django/template/__init__.py,
 line 344, in find_filter
raise TemplateSyntaxError, Invalid filter: '%s' % filter_name
TemplateSyntaxError: Invalid filter: 'safe'

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/cF0btCvUZvcJ.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Re: Ajax

2011-09-29 Thread Matt Jibson
You are using the old version of django, 0.96. You need to switch to django 1.2.

On Thu, Sep 29, 2011 at 9:14 AM, Max massimiliano.pietr...@gmail.com wrote:
 Now I have this error:

 File
 /base/python_runtime/python_lib/versions/third_party/django-0.96/django/template/__init__.py,
 line 344, in find_filter
 raise TemplateSyntaxError, Invalid filter: '%s' % filter_name
 TemplateSyntaxError: Invalid filter: 'safe'

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/google-appengine/-/cF0btCvUZvcJ.
 To post to this group, send email to google-appengine@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Re: Ajax

2011-09-29 Thread Max
I don't know how can I do it.
I'm not an It. I have my code  and I have deploy it in the cloud. This is 
the error I see in the online app.
Have I to import something specific?

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/-nF75G5s44YJ.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Re: Ajax

2011-09-29 Thread Matt Jibson
Use the process below, and specify '1.2' is the version:
http://code.google.com/appengine/docs/python/tools/libraries.html#Django

On Thu, Sep 29, 2011 at 9:38 AM, Max massimiliano.pietr...@gmail.com wrote:
 I don't know how can I do it.
 I'm not an It. I have my code  and I have deploy it in the cloud. This is
 the error I see in the online app.
 Have I to import something specific?

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To view this discussion on the web visit
 https://groups.google.com/d/msg/google-appengine/-/-nF75G5s44YJ.
 To post to this group, send email to google-appengine@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: Ajax

2011-09-27 Thread Max
You mean:
{{ AggLink|safe }}.
Is this the right way?

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-appengine/-/Eh9wByMumLYJ.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: ajax problem in gae.any people help me?

2009-04-16 Thread 风笑雪
I have no much time to read your code, but I would like give you
suggestions.
It's much easier to use AJAX library ( such as jQuery) to do an AJAX
application.

And since you're using Python, I think it's easier to use JSON to instead of
XML.

2009/4/16 DiveIntoGAE taogf1...@gmail.com


 when i change the customerId select, the departmentId select and the
 contactorName Select will also change,but the following code can't do
 that.can anybody points out the problem?
 The code is belowing:

 -
 script type=text/javascript
var xmlHttp;
function createXMLHttpRequest() {
if (window.ActiveXObject) {
xmlHttp = new ActiveXObject(Microsoft.XMLHTTP);
}
else if (window.XMLHttpRequest) {
xmlHttp = new XMLHttpRequest();
}
}
function refreshDeptAndContacList() {
var companyId = document.getElementById
 (companyId).value;
if(companyId == ) {
clearDepartmentsList();
return;
}
var url = getDeptsOfCustomer?companyId=+ companyId;
createXMLHttpRequest();
xmlHttp.onreadystatechange = handleStateChange;
xmlHttp.open(GET, url, true);
xmlHttp.send(null);
}
function handleStateChange() {
if(xmlHttp.readyState == 4) {
if(xmlHttp.status == 200) {
updateDepartmentsList();
}
}
}
function updateDepartmentsList() {alert
 (xmlHttp.responseXML.getElementsByTagName(department));
clearDepartmentsList();
var departments = document.getElementById(departmentId);
var resultsOfDept =
 xmlHttp.responseXML.getElementsByTagName(department);
var optionOfDept = null;
for(var i = 0; i  resultsOfDept.length; i++) {
optionOfDept = document.createElement(option);
optionOfDept.appendChild(document.createTextNode
 (resultsOfDept[i].firstChild.nodeValue));
departments.appendChild(optionOfDept);
}

var contactorNames = document.getElementById
 (contactorName);
var resultsOfContac =
 xmlHttp.responseXML.getElementsByTagName(contactorName);
var optionOfContac = null;
for(var i = 0; i  resultsOfContac.length; i++) {
optionOfContac = document.createElement(option);
optionOfContac.appendChild(document.createTextNode
 (resultsOfContac[i].firstChild.nodeValue));
contactorNames.appendChild(optionOfContac);
}
}
function clearDepartmentsList() {
var departments = document.getElementById(departmentId);
while(departments.childNodes.length  0) {
departments.removeChild(departments.childNodes[0]);
}
var contactorNames = document.getElementById
 (contactorName);
while(contactorNames.childNodes.length  0) {
contactorNames.removeChild(contactorNames.childNodes
 [0]);
}
}
/script

 -
 SELECT onchange=refreshDeptAndContacList(); size=1 id='companyId'
 name='companyId' style=width:100%
OPTION value= /OPTION
{% for company in queryCompanyList %}
OPTION value={{ company.CUSTOMER_ID }}
 {{ company.COMPANY_NAME }}/OPTION
{% endfor %}
/SELECT

 SELECT size=1 id='departmentId' name=departmentId style=width:200px
 onchange=

/SELECT
 SELECT size=1 id='contactorName' name=contactorName style=width:
 100% onchange=

/SELECT

 
 class GetDeptsOfCustomer(webapp.RequestHandler):
def get(self):
self.response.headers['ContentType'] = text ml;charset=UTF-8
companyId = self.request.get('companyId','1101')
queryDeptList = db.GqlQuery(SELECT * FROM M_CUSTOMERS_DEPT
 WHERE CUSTOMER_ID = :1 ORDER BY DEPT_ID, companyId)
results = companys
for dept in queryDeptList:
results += department
results += dept.DEPT_NAME
results += /department

results += contactorName
results += dept.PERSON_IN_CHARGE
results += /contactorName
results += /companys
self.response.headers['ContentType'] = text/xml
self.response.out.write(results)

 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the 

[google-appengine] Re: Ajax

2009-03-03 Thread PYD


Bonjour,

Thank for your help.
I think the problem was that the tutorial template i aHTML DTD, while
my light AjaxXmlLoad is XHTML DTD.
I suppose I will be able to manage.
However, my next step is to use Cheetah in Google App (I 'm used to
Cheetah).
So, is there somewhere code snippets / examples about this  (instead
of django)?

Thanks on forward

PY Delens
=
On 25 fév, 21:13, Doug doug...@gmail.com wrote:
 I am not sure that this is an GAE issue.


 I do not *think* that XML docemnts have an innerHTML property, so I
 think that you just need to handel the XML document that you loaded
 differently.

 I took your code and played with it in IE.  This code 'works', but the
 call to getElementsByTagName is returng a nodeList that would have to
 be converted back to HTML before you could display them. You would
 also have to add Firefox support back in.  IE gives me better errors
 from JavaScript, so that is why this is ie code.

 I hope this helps some!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Ajax

2009-02-25 Thread Doug


I am not sure that this is an GAE issue.

I saved our code on my computer and I can see that when running in the
dev server that you get an http 200 on the get for the xml document.
I do not *think* that XML docemnts have an innerHTML property, so I
think that you just need to handel the XML document that you loaded
differently.

I took your code and played with it in IE.  This code 'works', but the
call to getElementsByTagName is returng a nodeList that would have to
be converted back to HTML before you could display them. You would
also have to add Firefox support back in.  IE gives me better errors
from JavaScript, so that is why this is ie code.

I hope this helps some!


script type=text/javascript
var xmlDoc;
alert('start');
function loadXML() {
//load xml file
// code for IE
if (window.ActiveXObject) {
alert('Your browser IE');
 xmlDoc = new ActiveXObject(Microsoft.XMLDOM);
xmlDoc.async = false;
xmlDoc.load(Included_CUT.xhtml);
getmessage();
} }
function getmessage() {
document.getElementById
(message).innerHTML=xmlDoc.getElementsByTagName(body);
}
/script


Doug

On Feb 25, 7:40 am, PYD p...@pydelens.be wrote:
 Bonjour,

 I had my first tutorial/tests on Google All Engine, successfully
 OK :=)

 Now, my first concern is to check that I can upload html / xhtml pages
 with light Ajax invocation. My first test, o my local Google app
 server was negative. Then I remebered I read somewhere that Google
 Engine couldn't serve Ajax. But today googling on the Web seems to
 lead to examples of Ajax Working.

 Is there some doc on the limitations, if any?

 Thanks on forward.

 PY Delens
 ==
 Please find below the code I mean to upload:
   . Included_CUT.xhtml (a small table)
   . index.html (the calling container) with
         body onload=loadXML()
 

 ?xml version=1.0 encoding=UTF-8?
 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN
                       http://www.w3.org/TR/xhtml1/DTD/xhtml1-
 strict.dtd
 html xmlns=http://www.w3.org/1999/xhtml;
     head
         title/title
     /head
     body

         table class=forTable
             tr class=color_one
                 td align=leftRow One - Cell One/td
                 td align=leftRow One - Cell Two/td
                 td align=leftRow One - Cell Three/td
                 td align=leftRow One - Cell Four/td
             /tr
             tr class=color_two
                 td align=leftRow Two - Cell One/td
                 td align=leftRow Two - Cell Two/td
                 td align=leftRow Two - Cell Three/td
                 td align=leftRow Two - Cell Four/td
             /tr
             tr class=color_one
                 td align=leftRow Three - Cell One/td
                 td align=leftRow Three - Cell Two/td
                 td align=leftRow Three - Cell Three/td
                 td align=leftRow Three - Cell Four/td
             /tr
             tr class=color_two
                 td align=leftRow Four - Cell One/td
                 td align=leftRow Four - Cell Two/td
                 td align=leftRow Four - Cell Three/td
                 td align=leftRow Four - Cell Four/td
             /tr
         /table

     /body
 /html

 

 html
   head
     link type=text/css rel=stylesheet href=/stylesheets/
 main.css /
                 script type=text/javascript
                         //![CDATA[

 // SCRIPT ICI

       // Included_CUT.xhtml
             var xmlDoc;
             alert('start');
             function loadXML() {
                 //load xml file
                 // code for IE
                 if (window.ActiveXObject) {
                 alert('Your browser IE');
                  xmlDoc = new ActiveXObject(Microsoft.XMLDOM);
                     xmlDoc.async = false;
                     xmlDoc.load(Included_CUT.xhtml);
                     getmessage();
                 }
                 // code for Mozilla, Firefox, Opera, etc.
                 //  if and document.implementation.createDocument
                 else if (document.implementation 
 document.implementation.createDocument ) {
                 alert('Your browser FsFX');
                     xmlDoc = document.implementation.createDocument
 (, , null);
                    xmlDoc.load(Included_CUT.xhtml);
                    xmlDoc.onload = getmessage;
                 }
                 else {
                     alert('Your browser cannot handle this script');
                 }
                 alert('getmessage');
             }
             /*         */
         function getmessage()
         {
          // see how for IE
         document.getElementById
 

[google-appengine] Re: Ajax

2009-02-25 Thread GregF

On Feb 26, 2:40 am, PYD p...@pydelens.be wrote:
 server was negative. Then I remebered I read somewhere that Google
 Engine couldn't serve Ajax.

AJAX is just  javascript content. There are no specific limitations
for AJAX on Appengine, except for the limitations on content
generally: 1 GB storage, and 1000 files/app.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Ajax Updater parameters transfer

2008-12-15 Thread Matija

For '/update_tags/mark365'

Url mapping cloud be:

('/update_tags/(.*)', UpdateTags),

And class:

class UpdateTags(BaseRequestHandler):
   def get(self, mark):

Javascript:

function updateTags(mark){
   new Ajax.Updater('tagging_area', '/update_tags/' + mark, {
 method: 'get'
   });
}

For '/update_tags?mark=mark365'

('/update_tags.*', UpdateTags),

class UpdateTags(BaseRequestHandler):
   def get(self):
  mark = self.request.get('mark')

function updateTags(mark){
   new Ajax.Updater('tagging_area', '/update_tags?mark=' + mark, {
 method: 'get'
   });
}

For url '/update_tags' but with mark data in POST header

('/update_tags', UpdateTags),

class UpdateTags(BaseRequestHandler):
   def post(self):
   mark = self.request.get('mark')

function updateTags(mark){
   new Ajax.Updater('tagging_area', '/update_tags', {
 method: 'post',
 parameters: { 'mark':mark }
   });
}

Also your template file probably should be:

span class=itema href=javascript:updateTags({{mark}})b
{{mark}}/b/a/span

But good principle would be to separate presentation from behavior and
not to have html and javascript in same file. It depends of you
problem but something like:

span class=itema href=# class=marks id={{ mark }}strong
{{mark}}/strong/a/span

And in separate javascript file you need to have one more function
that is executed after html document downloaded:

this in html
script type=text/javascript
Event.observe(window, 'load', init);
/script

And javascript code in separate file

function init(){
   $$('.marks').each(function(linkMark){
   Event.observe(linkMark, 'click', updateTags);
   )};
}

function updateTags(mouseInfo){
   Event.stop(mouseInfo);
   var mark = mouseInfo.element().id; // or var mark =
mouseInfo.element().readAttribute('id');

   ... and here your preferred way of sending data.
}

Hope that helped. Matija.

P.S. There could be some writing errors.

On Dec 15, 7:09 am, Shay Ben Dov shay.ben...@gmail.com wrote:
 Hi,

 It should be '/update_tags/a' like when you use

 .?id={{ variable }}

 thanks,

 Shay


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Ajax Updater parameters transfer

2008-12-15 Thread Shay Ben Dov

thanks, I'll implement it in the following week and let you know how
it comes out.

Shay

On Dec 15, 11:29 am, Matija matija.jerko...@gmail.com wrote:
 For '/update_tags/mark365'

 Url mapping cloud be:

 ('/update_tags/(.*)', UpdateTags),

 And class:

 class UpdateTags(BaseRequestHandler):
    def get(self, mark):

 Javascript:

 function updateTags(mark){
    new Ajax.Updater('tagging_area', '/update_tags/' + mark, {
      method: 'get'
    });

 }

 For '/update_tags?mark=mark365'

 ('/update_tags.*', UpdateTags),

 class UpdateTags(BaseRequestHandler):
    def get(self):
       mark = self.request.get('mark')

 function updateTags(mark){
    new Ajax.Updater('tagging_area', '/update_tags?mark=' + mark, {
      method: 'get'
    });

 }

 For url '/update_tags' but with mark data in POST header

 ('/update_tags', UpdateTags),

 class UpdateTags(BaseRequestHandler):
    def post(self):
        mark = self.request.get('mark')

 function updateTags(mark){
    new Ajax.Updater('tagging_area', '/update_tags', {
      method: 'post',
      parameters: { 'mark':mark }
    });

 }

 Also your template file probably should be:

 span class=itema href=javascript:updateTags({{mark}})b
 {{mark}}/b/a/span

 But good principle would be to separate presentation from behavior and
 not to have html and javascript in same file. It depends of you
 problem but something like:

 span class=itema href=# class=marks id={{ mark }}strong
 {{mark}}/strong/a/span

 And in separate javascript file you need to have one more function
 that is executed after html document downloaded:

 this in html
 script type=text/javascript
     Event.observe(window, 'load', init);
 /script

 And javascript code in separate file

 function init(){
    $$('.marks').each(function(linkMark){
        Event.observe(linkMark, 'click', updateTags);
    )};

 }

 function updateTags(mouseInfo){
    Event.stop(mouseInfo);
    var mark = mouseInfo.element().id; // or var mark =
 mouseInfo.element().readAttribute('id');

    ... and here your preferred way of sending data.

 }

 Hope that helped. Matija.

 P.S. There could be some writing errors.

 On Dec 15, 7:09 am,ShayBen Dov shay.ben...@gmail.com wrote:



  Hi,

  It should be '/update_tags/a' like when you use

  .?id={{ variable }}

  thanks,

 Shay- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Ajax Updater parameters transfer

2008-12-14 Thread djidjadji

javascript:updateTags(mark)
what is mark in this function call?

 '/update_tags' + mark
this url will not be matched by
 ('/update_tags', UpdateTags),

Add some logging statements to see if you get inside the handler and
what the value of certain variables is.

2008/12/13 Shay Ben Dov shay.ben...@gmail.com:

 Hi,

 I'm trying to develop a tagging application. What I'm missing is the
 wrap-around of all the components involved.

 The principle is:

 The calling link:
 span class=itema href=javascript:updateTags(mark)b{{mark}}/
 b/a/span

 The JS function:

 function updateTags(mark){

   new Ajax.Updater('tagging_area', '/update_tags' + mark, {
 method: 'get'

   });

 }

 the url mapping in my py program:

 ('/update_tags', UpdateTags),

 the class in the py program

 class UpdateTags(BaseRequestHandler):
 def get(self):
  mark = self.request.get('id')
 ..
  self.response.headers['Content-Type'] = 'text/plain'
  self.response.out.write(this is new tag__ + mark)

 I hope I'm doing it right.
 Please let me know if I'm on the right track to implement it
 correctly.

 Thanks,

 Shay Ben Dov
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Ajax Updater parameters transfer

2008-12-14 Thread Shay Ben Dov

'/update_tags' + mark

mark is name of the parameter I want to transfer to the following
class:

class UpdateTags(BaseRequestHandler):

and I wish to process it according to the app requirements.

Shay

On Dec 14, 11:26 am, djidjadji djidja...@gmail.com wrote:
 javascript:updateTags(mark)

 what is mark in this function call?

  '/update_tags' + mark

 this url will not be matched by

  ('/update_tags', UpdateTags),

 Add some logging statements to see if you get inside the handler and
 what the value of certain variables is.

 2008/12/13ShayBen Dov shay.ben...@gmail.com:





  Hi,

  I'm trying to develop a tagging application. What I'm missing is the
  wrap-around of all the components involved.

  The principle is:

  The calling link:
  span class=itema href=javascript:updateTags(mark)b{{mark}}/
  b/a/span

  The JS function:

  function updateTags(mark){

    new Ajax.Updater('tagging_area', '/update_tags' + mark, {
      method: 'get'

    });

  }

  the url mapping in my py program:

  ('/update_tags', UpdateTags),

  the class in the py program

  class UpdateTags(BaseRequestHandler):
  def get(self):
   mark = self.request.get('id')
  ..
   self.response.headers['Content-Type'] = 'text/plain'
   self.response.out.write(this is new tag__ + mark)

  I hope I'm doing it right.
  Please let me know if I'm on the right track to implement it
  correctly.

  Thanks,

 ShayBen Dov- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Ajax Updater parameters transfer

2008-12-14 Thread Andy Freeman

If mark == 'a', do you expect '/update_tags' + mark to be '/
update_tagsa' or '/update_tags/a'?

Which one do you think will match ('/update_tags', UpdateTags)?

And, once you get a form that matches, how are you planning to extract
the original value of mark?


On Dec 14, 3:13 am, Shay Ben Dov shay.ben...@gmail.com wrote:
 '/update_tags' + mark

 mark is name of the parameter I want to transfer to the following
 class:

 class UpdateTags(BaseRequestHandler):

 and I wish to process it according to the app requirements.

 Shay

 On Dec 14, 11:26 am, djidjadji djidja...@gmail.com wrote:



  javascript:updateTags(mark)

  what is mark in this function call?

   '/update_tags' + mark

  this url will not be matched by

   ('/update_tags', UpdateTags),

  Add some logging statements to see if you get inside the handler and
  what the value of certain variables is.

  2008/12/13ShayBen Dov shay.ben...@gmail.com:

   Hi,

   I'm trying to develop a tagging application. What I'm missing is the
   wrap-around of all the components involved.

   The principle is:

   The calling link:
   span class=itema href=javascript:updateTags(mark)b{{mark}}/
   b/a/span

   The JS function:

   function updateTags(mark){

     new Ajax.Updater('tagging_area', '/update_tags' + mark, {
       method: 'get'

     });

   }

   the url mapping in my py program:

   ('/update_tags', UpdateTags),

   the class in the py program

   class UpdateTags(BaseRequestHandler):
   def get(self):
    mark = self.request.get('id')
   ..
    self.response.headers['Content-Type'] = 'text/plain'
    self.response.out.write(this is new tag__ + mark)

   I hope I'm doing it right.
   Please let me know if I'm on the right track to implement it
   correctly.

   Thanks,

  ShayBen Dov- Hide quoted text -

  - Show quoted text -- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---



[google-appengine] Re: Ajax Updater parameters transfer

2008-12-14 Thread Shay Ben Dov

Hi,

It should be '/update_tags/a' like when you use

.?id={{ variable }}

thanks,

Shay

On Dec 14, 11:51 pm, Andy Freeman ana...@earthlink.net wrote:
 If mark == 'a', do you expect '/update_tags' + mark to be '/
 update_tagsa' or '/update_tags/a'?

 Which one do you think will match ('/update_tags', UpdateTags)?

 And, once you get a form that matches, how are you planning to extract
 the original value of mark?

 On Dec 14, 3:13 am,ShayBen Dov shay.ben...@gmail.com wrote:



  '/update_tags' + mark

  mark is name of the parameter I want to transfer to the following
  class:

  class UpdateTags(BaseRequestHandler):

  and I wish to process it according to the app requirements.

 Shay

  On Dec 14, 11:26 am, djidjadji djidja...@gmail.com wrote:

   javascript:updateTags(mark)

   what is mark in this function call?

'/update_tags' + mark

   this url will not be matched by

('/update_tags', UpdateTags),

   Add some logging statements to see if you get inside the handler and
   what the value of certain variables is.

   2008/12/13ShayBen Dov shay.ben...@gmail.com:

Hi,

I'm trying to develop a tagging application. What I'm missing is the
wrap-around of all the components involved.

The principle is:

The calling link:
span class=itema href=javascript:updateTags(mark)b{{mark}}/
b/a/span

The JS function:

function updateTags(mark){

  new Ajax.Updater('tagging_area', '/update_tags' + mark, {
    method: 'get'

  });

}

the url mapping in my py program:

('/update_tags', UpdateTags),

the class in the py program

class UpdateTags(BaseRequestHandler):
def get(self):
 mark = self.request.get('id')
..
 self.response.headers['Content-Type'] = 'text/plain'
 self.response.out.write(this is new tag__ + mark)

I hope I'm doing it right.
Please let me know if I'm on the right track to implement it
correctly.

Thanks,

   ShayBen Dov- Hide quoted text -

   - Show quoted text -- Hide quoted text -

  - Show quoted text -- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~--~~~~--~~--~--~---