[Seaside] Named PTAjax calls

Aaron Rosenzweig aaron at cocoanutstech.com
Sun Dec 15 14:50:06 UTC 2013


Hello,

Is there a way to “name” a PTAjax callback so that it can be conveniently invoked from javascript?

Situation:
Want to effectively have a submit button (or hyperlink) on the page with an on click Updater callback… then from something programmatically on the page… *click* that link.

Problems:
1) Having a hidden button or link to click is not elegant (I feel dirty)

2) It doesn’t always work. For various reasons, doing a domElement.click() is not the same as a human hand doing a click because it doesn’t generate a full mouse click event.

Thought:
There must be a way to setup the following:
A) Create a PTAjax object with a name that is a global javascript variable on the client side (web browser)

B) You would provide the “javascript function name” a “seaside callback” a “HTML form ID or form name” so that synchronization of form variables can take place and finally an “update container ID”

C) You could just invoke it from your javascript code and know that it will safely update the server.

Does this make sense?
AARON ROSENZWEIG / Chat 'n Bike
e:  aaron at chatnbike.com  t:  (301) 956-2319 		
	

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20131215/487f83f3/attachment.htm


More information about the seaside mailing list