CBL Partial Updater (20050922) Released!
I just released a new version of CBL Partial Updater.
In this release, I added support for spinners. By adding a spinner imae object to the HTML and specifying it in a JavaScript function call,
will be displayed while AJAX requests are being processed.
Comments
thanks for releasing this. i like how simple it makes things
Posted by: markc
|
September 23, 2005 08:36 AM
Hi
Does this work in xhtml stricted i get a javascript message box every time i use an event, with my pages source appearing on the javascript alert message box its a straight forward ajax insert into the database?
Posted by: Darren
|
October 25, 2005 09:06 PM
I suspect you are seeing an ``invalid response'' error message with the actual response (which is so long that the error message got out of screen).
One common case of seeing this message is that your application is responding to all the POST messages by redirections. You should not send location headers to AJAX requests. You can check if this is the case by looking at your server log files.
Posted by: kazuho
|
October 31, 2005 01:15 PM
the probelm is with the parser, it was the headers causing the message box display but if you have display text with >> or > it causes an error you can see once the browser has done the request it escapes at that position so if you write your code as
echo '>" onClick="etc">';
it escapes on the >> text i looked at the html parser file and it obvoiusly looks for entities how to over come this i am not sure.
Posted by: Darren
|
October 31, 2005 06:03 PM
I just uploaded a new version of CBL PartialUpdater on SourceForge.
Older versions did not work correctly if there was a single-quote (') in HTML attributes.
I'm not sure this is your case or not, but it may be worth a try.
Posted by: kazuho
|
November 4, 2005 02:51 PM
Hi,
Would it be possible for you to take a look at a templating system I have and give me advice on integrating it with CBL Partial Updater. In the same way you have integrated it with smarty templating system. Thx.
Posted by: twiceknightly
|
November 6, 2005 08:34 AM
Do you mind me afterwards blogging the generalized points on how to integrating the updater to existing template systems?
If that's possible, I am happy to provide assistance. If you wish to contact me, please use this blog or send mail via SourceForge.
Posted by: kazuho
|
November 7, 2005 05:16 PM
Kazuho,
That would be great if you generalize the integration of the updater to existing template systems and document it. It would be of great value to everyone and have more people using the updater im sure.
I have a site that I have templated using a version of the templating system used for phpbb. I would be interested in using your updater for that site. Could I sent the template to you. My email address is r_bradwell@bidudo.com
regards
Richard.
P.S. You are doing a great job of the updater!
Posted by: twiceknightly
|
November 9, 2005 06:54 AM
Is it possible to submit and update multiple forms on the same page with one click?
Posted by: Jon
|
January 2, 2006 11:13 PM
You can update any number of HTML items (including multiple forms) at once, but cannot submit multiple forms at once.
Posted by: kazuho
|
January 5, 2006 01:02 AM
Can you show a sample code for updating multiple forms at once? Thanks.
Posted by: Jon
|
January 6, 2006 08:15 PM
To update multiple HTML items at once, pass there IDs as an array to the updater.
ex:
<div id="area_1">...</div>
<div id="area_2">...</div>
CBL_PartialUpdater::display($smarty, 'index.tpl', array('area_1', 'area_2'));
# or use below if not using smarty
CBL_PartialUpdater::ob_end(array('area_1', 'area_2'));
Posted by: kazuho
|
January 8, 2006 12:05 AM
inside
Posted by: mos9394
|
January 31, 2006 02:54 AM
inside the div "table" listing the live searched mysql data such as id and title, how can i use CBL_PartialUpdater again to display "description" by press "title"'s content into another div ?
thx !
Posted by: mos9394
|
January 31, 2006 02:56 AM
Include a onClick event handler in each "title"'s content, that modify's the query params of the AJAX request.
Let the server generate HTML including the appropriate "description" by the query param.
Posted by: kazuho
|
February 2, 2006 03:35 PM
my script is as below, but it doesn't work...is there something wrong...
foreach ( $msgarray as $msg ) {
a href="msg.php?id=" onClick='CBL_PartialUpdater.update("msg.php/ajax", id,{ spinnerId:"spinner", spinnerImg:"images/spinner.gif" });return false; >msg->title
Posted by: mos9394
|
February 2, 2006 11:42 PM
I don't see any problems in the code you posted.
Maybe there's a bug elsewhere.
Posted by: kazuho
|
February 7, 2006 01:48 PM
can i send you the script for debug !
Posted by: mos9394
|
February 10, 2006 03:42 PM
by the way, below is a error message will happen in one of my server, what is it stand for ?!
フォカスをコントロールに移動できません。コントロールは表示されていない、使用できない状態、またはフォーカスを受け入れない種類です。
thx
Posted by: mos9394
|
February 10, 2006 04:17 PM
actually, the correct param setting is
a href="msg.php?id=?php$id?" onClick='CBL_PartialUpdater.update("msg.php/ajax", thix),return false;' >msg->title
or
a href="javascript:void(0);" onClick='CBL_PartialUpdater.update("msg.php/ajax", ?$id?),return false;' >msg->title
i don't really know how to pass the value from a hyper link to server...pls help...
Posted by: mos9394
|
February 11, 2006 03:46 PM
Please send your code to kazuhooku __at__ gmail.com, and I'll take a look into it.
Posted by: kazuho
|
February 14, 2006 01:51 AM
I'm currently trying to implement your system into an AJAX style tabbed system similar to this site here:
http://www.crackajax.net/tabs.php
What i'm trying to do is get it so that it will dynamically still insert/update/delete database records similar to how you have it, except within one of those Tabbed pages.
I've gotten semi close, but to the point where I get no errors or anything... it just doesn't do anything at all. You click submit and it just simply doesn't work.
I'm working it into a PHP5 document, and can provide some source perhaps and a link to the site even that i'm doing this on if you think you can possibly assist?
Thanks much for your time.
Posted by: NBishop
|
April 6, 2006 06:45 PM
Hi, I download and try to use CBL partial update and its great, but is incompatible with the lasted version of prototype (1.4.x).
Thanks!!!!
Posted by: Fabio Quintero
|
July 30, 2006 03:34 AM
I'm getting this same error:
When I try to post something, the "loading image" shows up and then, 'I get a javascript message box, with my pages source appearing on the javascript alert message box'
and also this part of the code:
CBL_PartialUpdater::ob_end('dcomentarios');
gives me an error, telling me I cannot use it on my code, even when I add the ob_start() on the beggining.
I'm not using Smarty and I'm using the example to post comments with mysql/php $_POST (not the livesearch).
Can you help me?
And congrats to you.
If I get this working, I'll be extremely gratefull to you. :)
Posted by: lahlah barros
|
September 24, 2006 02:20 AM
ok, I solved this 2 problems by changinf this:
CBL_PartialUpdater::ob_end('dcomentarios');
to this:
CBL_PartialUpdater::ob_end_flush('dcomentarios');
But the form submissions aren't inserted into the mysql database and the div dcomentarios is not refreshed. :(
Posted by: lahlah barros
|
September 24, 2006 02:33 AM
First of all, thanks for this AJAX library. It's been a while since I'm using it and I really like it. However, it seems that the response time is considerably slower than other libraries. I am wondering what is the reason and if that could be solved in any way. Also I would like to know what is the latest version of prototype that this library would work with. Any help in this matter would be greatly appreciated.
Posted by: GabrielANTAL
|
October 9, 2007 02:01 AM
Oh! There is one more thing that I'd like to know. I would like to use CBL_PartialUpdater.liveUpdate to have the contents of one container updated but I couldn't figure out how to do that. A short example of how to do that would be really helpful. Although I see it's been a long time since the last post on this blog, I hope someone will answer :)
Regards
Posted by: GabrielANTAL
|
October 9, 2007 02:08 AM