vcl4php-developers Mailing List for VCL for PHP (Page 6)
Brought to you by:
ttm
You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
(63) |
May
(29) |
Jun
(135) |
Jul
(36) |
Aug
(15) |
Sep
(30) |
Oct
|
Nov
(6) |
Dec
(2) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
|
Feb
(1) |
Mar
(3) |
Apr
|
May
(2) |
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(9) |
Dec
(15) |
2009 |
Jan
(2) |
Feb
(4) |
Mar
(2) |
Apr
|
May
(8) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
From: qadram s. <su...@qa...> - 2007-07-04 09:17:55
|
FrozenDice escribió: > Ajax isn't working for me whenever the Form's name isn't the one it > originally was. If I open up the basicajax sample that came with > Delphi4PHP it will run, if I go and change the name of the form, save > then run it I get an alert that there was whitespace in the response. > It's too long to type so here's a screencap. > http://uomu.com/public/errorajax.jpg > > Can anyone else replicate this or is it just my system? No, but send the code as-is, with the name changed and will try. Regards -- José León qadram software C/Juan Ramón Jiménez, 15 Entlo. 2 03203 Elche ALICANTE (SPAIN) T: +34 965 45 48 48 F: +34 965 45 48 48 M: +34 618 28 13 69 http://www.qadram.com |
From: qadram s. <su...@qa...> - 2007-07-04 09:15:54
|
FrozenDice escribió: >> Hi all, >> Here's a new patch for Window component >> >> ChangeLog: >> + Added to Window component the following JavaScript events: OnResize, >> OnMove, OnMinimize, OnRestore and OnMaximize. >> >> Known issues: >> OnMove and OnResize are fired twice it window is moved/resized in >> both directions (ie. changed with and height or changed left and top). >> -- >> Tiago Lima Trinidad > > Wow, this is going to be awesome, able to do things on minimize, etc. > 2 questions though. > > 1. I see there's an attached .patch file, how do I use this to patch > D4PHP? Or is this a new component? To apply patches, you should have an SVN client, like TortoiseSVN, which allows you to easily apply those changes to your existing VCL folder. You can find more info here: http://www.qadram.com/vcl4php/wiki/index.php/Contributors_guide#How_to_apply_.patch_files_to_the_existing_VCL_for_PHP_code.3F Regards -- José León qadram software C/Juan Ramón Jiménez, 15 Entlo. 2 03203 Elche ALICANTE (SPAIN) T: +34 965 45 48 48 F: +34 965 45 48 48 M: +34 618 28 13 69 http://www.qadram.com |
From: qadram s. <su...@qa...> - 2007-07-04 08:55:39
|
Rob Wilkens escribió: > Ok, Here's the issue: > >>From __get in dbtables.php: > > if ($this->State==dsBrowse) > { > return ($this->_rs->fields[$nm]); > } > > What happens: > When you retrieve $query1->Name and in browse mode, instead of > returning the name of the property, the above code will return the > value of the field. > > So, When it goes to store this information in the session, the name it > stores in the session (the value it does the __get on) is the value of > the last field it had with that name. In my case, for example, it > might store the name as "[Contact List]" which certainly confuses > matters. > > Put another way: The way it works now is dumb. I think this: if ($this->State==dsBrowse) { return ($this->_rs->fields[$nm]); } Is only called by $query1->Name if you have a field on your query called Name, the question here is: How the VCL for PHP knows that you want the Name property and not the Name field? The solution would be to change the priority on this method, that is, first check for a property, and if not exists, then, search for the field, it wasn't coded that way because the existing is faster when working with data. So, concluding, if you want to use this calling way ($dataset->fieldname): -When you design your database tables, always qualify your field names -When you design your database tables, don't use dataset properties as field names -Use _rs->fields directly -Use AssociativeFieldValues or: -We can add a _ function to datasets: $query->_("Name") or: -We can add an object property to datasets $query->field->Name To be processed by the __get and __set of a field basic object, which would be a property of object type. Just let us know. Regards -- José León qadram software C/Juan Ramón Jiménez, 15 Entlo. 2 03203 Elche ALICANTE (SPAIN) T: +34 965 45 48 48 F: +34 965 45 48 48 M: +34 618 28 13 69 http://www.qadram.com |
From: qadram s. <su...@qa...> - 2007-07-04 08:44:10
|
Jonathan Benedicto escribió: > Being a component developer, it is quite important for me to know the > revision/version of the VCL installed on a user's PC, when my installer is > installing my components. > > Would it be a possiblity to add a version.txt file to the VCL releases that > contains the revision # of the VCL? Do you mean the revision number of the repository? Regards -- José León qadram software C/Juan Ramón Jiménez, 15 Entlo. 2 03203 Elche ALICANTE (SPAIN) T: +34 965 45 48 48 F: +34 965 45 48 48 M: +34 618 28 13 69 http://www.qadram.com |
From: qadram s. <su...@qa...> - 2007-07-04 08:43:36
|
Jonathan Benedicto escribió: > The only problem with this approach is that that # changes too slowly. > Perhaps Jose will update it with every revision from now on, but that set of > defines have been in the VCL from the beginning IIRC. The goal for that setting is to update it with *stable* releases, that is: -Stable release is out (i.e. 1.0) -Just after that, the release must be changed to 1.1 on the repository It's not useful to develop a component or an application targeting a non-stable release. Regards -- José León qadram software C/Juan Ramón Jiménez, 15 Entlo. 2 03203 Elche ALICANTE (SPAIN) T: +34 965 45 48 48 F: +34 965 45 48 48 M: +34 618 28 13 69 http://www.qadram.com |
From: qadram s. <su...@qa...> - 2007-07-04 08:41:10
|
Tiago Lima Trinidad escribió: > Hi! > Same thing happened to me. Some messages seem to just disapear into > quantum vaccum... weird. If anyone knows how to avoid this, I'll be > thankful. > Regards The same happened to me yesterday, it should be some problem with the sourceforge servers. Regards -- José León qadram software C/Juan Ramón Jiménez, 15 Entlo. 2 03203 Elche ALICANTE (SPAIN) T: +34 965 45 48 48 F: +34 965 45 48 48 M: +34 618 28 13 69 http://www.qadram.com |
From: qadram s. <su...@qa...> - 2007-07-04 08:39:43
|
FrozenDice escribió: > My problem is I have an application that uses the onCreate of the > form, and lots of other server side events, unfortunately these ALL > GET CALLED. What was CodeGear thinking when they implemented xajax > like this? We where thinking in making things as simple as possible. Why are all events called and objects created? Because if the working code in your ajax procedure needs to use these objects, all of them must be available to the application, in the same state they were left, that's the way it should be done. On the other hand, if you want a faster ajax call and you are not going to need any of these objects and you just want a basic procedure called, you can use the xajax library included and craft the call by yourself, but that is PHP coding. > Workarounds? Ideas? What we can do is to add another parameter to the ajaxCall method, which doesn't perform this, that is, when is true, then it just calls an specific method of the class, but objects won't be created, nor events called. What do you think? Regards -- José León qadram software C/Juan Ramón Jiménez, 15 Entlo. 2 03203 Elche ALICANTE (SPAIN) T: +34 965 45 48 48 F: +34 965 45 48 48 M: +34 618 28 13 69 http://www.qadram.com |
From: qadram s. <su...@qa...> - 2007-07-04 08:32:46
|
Jeroen Pluimers escribió: > Jon, > > How can I *download* those archives, i.e. for importing them in an email > program? Which e-mail software do you use? Don't know if someone here can send you the messages as files and then you can import them. Regards -- José León qadram software C/Juan Ramón Jiménez, 15 Entlo. 2 03203 Elche ALICANTE (SPAIN) T: +34 965 45 48 48 F: +34 965 45 48 48 M: +34 618 28 13 69 http://www.qadram.com |
From: qadram s. <su...@qa...> - 2007-07-04 08:30:10
|
Jonathan Benedicto escribió: > I recently managed to get hold of a VCL page, someone has put together > using Delphi For PHP, that contains a significant amount of controls. In > fact, there are probably close to 100. > > The VCL performance with loading, parsing and generating HTML code for > this page was rather poor, averaging 6 seconds to display the page on my > Core 2 Duo 2.4Ghz machine. Because of this, I decided to try and > optimize the VCL somewhat. I am very glad to be able to say that I have > succeeded to reducing that time to 1.6 seconds. > > I did not use any external caching tools such as APC or XCache to do > this, all I have done is profile the VCL, identify the slowest routines, > and re-work them so that they have a significantly higher performance. > Most of the work took place in classes.inc.php, though system.inc.php > received some attention. > > I have attached both patch and full code files to this message. Please > don't hesitate to comment, suggest, question etc. I have checked the patch and it looks good to me, have you tested your e-commerce application to see if it works ok with the patch applied? We are right now working on the testing framework and once we get it right (2 days at most), I will check to apply your patch. Regards -- José León qadram software C/Juan Ramón Jiménez, 15 Entlo. 2 03203 Elche ALICANTE (SPAIN) T: +34 965 45 48 48 F: +34 965 45 48 48 M: +34 618 28 13 69 http://www.qadram.com |
From: qadram s. <su...@qa...> - 2007-07-04 08:21:18
|
Hello, I send this mail to let you know about what happened in the last two weeks and to introduce you two new qadram software members that will be focused in the VCL for PHP development from now on. The last two weeks I have been really busy getting ready for the expansion of the company to add enough resources to work towards version 2.0, that's why I have not answered some of the emails on the mailing list, those will be answered asap. The new qadram software members are: Juan José Durán <jua...@qa...> Miguel González <mig...@qa...> And they will start their VCL for PHP work by completing the missing test cases for the test framework. You can help us also on this task, by sending tests to be integrated and added and, of course, applications or small test apps we can use to test the integrity of the library against changes. Even we are in the same physical office, all discussions regarding this project will take place through the mailing list, so you can participate. And any additions/changes we plan to make, will be first discussed on the list with you. If you have any questions, please, don't hesitate to ask. -- José León qadram software C/Juan Ramón Jiménez, 15 Entlo. 2 03203 Elche ALICANTE (SPAIN) T: +34 965 45 48 48 F: +34 965 45 48 48 M: +34 618 28 13 69 http://www.qadram.com -- José León qadram software C/Juan Ramón Jiménez, 15 Entlo. 2 03203 Elche ALICANTE (SPAIN) T: +34 965 45 48 48 F: +34 965 45 48 48 M: +34 618 28 13 69 http://www.qadram.com |
From: qadram s. <su...@qa...> - 2007-07-04 08:19:39
|
FrozenDice escribió: > I upgraded to v61 of the VCL a few days ago and as far as I know > that's still the latest. I'm having problems, am getting a strange > error on pretty much any app I run it's always like this > > Fatal error: Call to a member function execute() on a non-object in > C:\Users\Dan\Documents\Delphi for PHP Projects\MEGA > CLONE\locationGroupBox.php on line 33 > > I have no clue what is causing this, projects that used to work before > are now broken. Has anyone else had these problems or know how to fix > it? By that message it seems to me the table/query you are using has some kind of problem and the execute method is working on a closed dataset, can you send some snippet? Regards -- José León qadram software C/Juan Ramón Jiménez, 15 Entlo. 2 03203 Elche ALICANTE (SPAIN) T: +34 965 45 48 48 F: +34 965 45 48 48 M: +34 618 28 13 69 http://www.qadram.com |
From: FrozenDice <fro...@gm...> - 2007-07-02 17:52:17
|
I upgraded to v61 of the VCL a few days ago and as far as I know that's still the latest. I'm having problems, am getting a strange error on pretty much any app I run it's always like this Fatal error: Call to a member function execute() on a non-object in C:\Users\Dan\Documents\Delphi for PHP Projects\MEGA CLONE\locationGroupBox.php on line 33 I have no clue what is causing this, projects that used to work before are now broken. Has anyone else had these problems or know how to fix it? - Dan |
From: Rob W. <rob...@gm...> - 2007-07-01 01:27:40
|
I took this down -- I did see one or two people were viewing it in the last 2 days, but decided it wasn't worth maintaining. -Rob On 6/29/07, Rob Wilkens <rob...@gm...> wrote: > I have a VCL 4 PHP app I'm willing to share a link to here (not w/ the > source), username/password: public, database: public (that's the only > DB listed). Location: http://robwilkens.com/TreeView.php .. > > It doesn't let you alter data, but you can click on the tree to select > a record, and click to details to see details, and note how it uses > AJAX (not VCL AJAX) to update the record each time you click over to > the details tab. Perhaps I could switch it to VCL AJAX but at the > time I didn't know how to use it (this was written during my first > week of experimenting with VCL4PHP/Delphi4PHP). > > I'm putting this here because it's going to be my "test app" and if I > run into problems, I'll link you there to demonstrate the problem(s) > > This is not guaranteed to always be up. I may take it down at some > point, perhaps permanently. > > -Rob > > -- > Rob Wilkens > -- Rob Wilkens |
From: Rob W. <rob...@gm...> - 2007-06-29 16:14:17
|
I have a VCL 4 PHP app I'm willing to share a link to here (not w/ the source), username/password: public, database: public (that's the only DB listed). Location: http://robwilkens.com/TreeView.php .. It doesn't let you alter data, but you can click on the tree to select a record, and click to details to see details, and note how it uses AJAX (not VCL AJAX) to update the record each time you click over to the details tab. Perhaps I could switch it to VCL AJAX but at the time I didn't know how to use it (this was written during my first week of experimenting with VCL4PHP/Delphi4PHP). I'm putting this here because it's going to be my "test app" and if I run into problems, I'll link you there to demonstrate the problem(s) This is not guaranteed to always be up. I may take it down at some point, perhaps permanently. -Rob -- Rob Wilkens |
From: Jonathan B. <co...@jo...> - 2007-06-29 15:09:22
|
This is the news I like to hear :-) BTW. I'm still going to try to reduce that time even further. Jon ----- Original Message ----- From: "Rob Wilkens" <rob...@gm...> To: <vcl...@li...> Sent: Friday, June 29, 2007 8:56 AM Subject: Re: [vcl4php-developers] VCL performance optimizations >I merged this patch in with my patches and tried it out --- It's > noticably faster to load the page than it was before I applied his > patch. > > I hesitate to say it even makes D4P load faster too. > > -Rob > > On 6/29/07, Jonathan Benedicto <co...@jo...> wrote: >> I recently managed to get hold of a VCL page, someone has put together >> using >> Delphi For PHP, that contains a significant amount of controls. In fact, >> there are probably close to 100. >> >> The VCL performance with loading, parsing and generating HTML code for >> this >> page was rather poor, averaging 6 seconds to display the page on my Core >> 2 >> Duo 2.4Ghz machine. Because of this, I decided to try and optimize the >> VCL >> somewhat. I am very glad to be able to say that I have succeeded to >> reducing >> that time to 1.6 seconds. >> >> I did not use any external caching tools such as APC or XCache to do >> this, >> all I have done is profile the VCL, identify the slowest routines, and >> re-work them so that they have a significantly higher performance. Most >> of >> the work took place in classes.inc.php, though system.inc.php received >> some >> attention. >> >> I have attached both patch and full code files to this message. Please >> don't >> hesitate to comment, suggest, question etc. >> >> Jon > > > -- > Rob Wilkens |
From: Rob W. <rob...@gm...> - 2007-06-29 14:39:44
|
I probably something I did wrong (I hope).. I reverted my SVN tree to the latest svn copy (backing out any temporary changes made)..... Then I applied my Jun 14 patch, and Jonathan's latest patch (any others I should try?) and the problem went away on its own. I apologize for wasting bandwidth. -Rob On 6/29/07, Rob Wilkens <rob...@gm...> wrote: > I just deployed the latest vcl4php patches (including my patches) to > my network server, and boy did my _local_ _system_ slow down when I > access those pages a third time (i.e. i have a log-in ability on my > page, and you can switch between databases, so I load the page once - > fine, log into first database - a little sluggish, log into 2nd > database- system comes to a crawl and is unusable). Windows came to a > crawl twice to where a reboot was the only thing that could help. > > I don't believe Jonathan's latest patches are the culprit, as after I > backed out those changes (And left mine there) it was still doing the > same thing (well, I think it was anyway) . > > I'm going to do some troubleshooting, but I've only got an hour or two > then i'm leaving for the afternoon. > > If I can find a way to illustrate this without giving away passwords, > I will do this. > > -- > Rob Wilkens > -- Rob Wilkens |
From: Rob W. <rob...@gm...> - 2007-06-29 13:52:52
|
I just deployed the latest vcl4php patches (including my patches) to my network server, and boy did my _local_ _system_ slow down when I access those pages a third time (i.e. i have a log-in ability on my page, and you can switch between databases, so I load the page once - fine, log into first database - a little sluggish, log into 2nd database- system comes to a crawl and is unusable). Windows came to a crawl twice to where a reboot was the only thing that could help. I don't believe Jonathan's latest patches are the culprit, as after I backed out those changes (And left mine there) it was still doing the same thing (well, I think it was anyway) . I'm going to do some troubleshooting, but I've only got an hour or two then i'm leaving for the afternoon. If I can find a way to illustrate this without giving away passwords, I will do this. -- Rob Wilkens |
From: Rob W. <rob...@gm...> - 2007-06-29 12:56:55
|
I merged this patch in with my patches and tried it out --- It's noticably faster to load the page than it was before I applied his patch. I hesitate to say it even makes D4P load faster too. -Rob On 6/29/07, Jonathan Benedicto <co...@jo...> wrote: > I recently managed to get hold of a VCL page, someone has put together using > Delphi For PHP, that contains a significant amount of controls. In fact, > there are probably close to 100. > > The VCL performance with loading, parsing and generating HTML code for this > page was rather poor, averaging 6 seconds to display the page on my Core 2 > Duo 2.4Ghz machine. Because of this, I decided to try and optimize the VCL > somewhat. I am very glad to be able to say that I have succeeded to reducing > that time to 1.6 seconds. > > I did not use any external caching tools such as APC or XCache to do this, > all I have done is profile the VCL, identify the slowest routines, and > re-work them so that they have a significantly higher performance. Most of > the work took place in classes.inc.php, though system.inc.php received some > attention. > > I have attached both patch and full code files to this message. Please don't > hesitate to comment, suggest, question etc. > > Jon > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > vcl4php-developers mailing list > vcl...@li... > https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > > > -- Rob Wilkens |
From: Jonathan B. <co...@jo...> - 2007-06-29 07:10:02
|
I recently managed to get hold of a VCL page, someone has put together using Delphi For PHP, that contains a significant amount of controls. In fact, there are probably close to 100. The VCL performance with loading, parsing and generating HTML code for this page was rather poor, averaging 6 seconds to display the page on my Core 2 Duo 2.4Ghz machine. Because of this, I decided to try and optimize the VCL somewhat. I am very glad to be able to say that I have succeeded to reducing that time to 1.6 seconds. I did not use any external caching tools such as APC or XCache to do this, all I have done is profile the VCL, identify the slowest routines, and re-work them so that they have a significantly higher performance. Most of the work took place in classes.inc.php, though system.inc.php received some attention. I have attached both patch and full code files to this message. Please don't hesitate to comment, suggest, question etc. Jon |
From: Jonathan B. <co...@jo...> - 2007-06-28 13:01:39
|
Please ignore this message - the CSS validator was mixed up. Jon ----- Original Message ----- From: "Jonathan Benedicto" <co...@jo...> To: <vcl...@li...> Sent: Thursday, June 28, 2007 8:55 AM Subject: [vcl4php-developers] some css changes > HTML 4.01 CSS validation doesn't like the uppercase styles that are used > by > the ABS_XY_LAYOUT, so I'm submitting a patch that changes them to > lowercase. > > Jon |
From: Jonathan B. <co...@jo...> - 2007-06-28 12:55:45
|
HTML 4.01 CSS validation doesn't like the uppercase styles that are used by the ABS_XY_LAYOUT, so I'm submitting a patch that changes them to lowercase. Jon |
From: Jeroen P. <jer...@pl...> - 2007-06-27 18:33:42
|
Jon, How can I *download* those archives, i.e. for importing them in an email program? --jeroen On 6/23/07, Jonathan Benedicto <co...@jo...> wrote: > > Hi, > > You can get the archives of this mailing list here: > https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > > HTH > > Jon > > ----- Original Message ----- > *From:* Jeroen Pluimers <jer...@pl...> > *To:* vcl...@li... > *Sent:* Saturday, June 23, 2007 6:35 AM > *Subject:* [vcl4php-developers] Off-line access to these messages? > > > Given the fact that I'm an off-line guy, I'd rather use newsgroups for > communicating. > Newsgroups have two advantages: offline access, and history. > > Given the fact that there seems to be no vcl4php newsgroup, I'd like to > know how to cope with this: > How can I get the content of the vcl4php-developers mailing list in an > offline way? > Preferably in some way of threaded way, in email. > > --jeroen > a Delphi for PHP guy > > ------------------------------ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > > ------------------------------ > > _______________________________________________ > vcl4php-developers mailing list > vcl...@li... > https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > vcl4php-developers mailing list > vcl...@li... > https://lists.sourceforge.net/lists/listinfo/vcl4php-developers > > -- --jeroen a Delphi for PHP guy |
From: Jonathan B. <co...@jo...> - 2007-06-27 14:41:21
|
Seems like there is a bug in the VCL regarding derived pages and php sessioning. In classes.inc.php, line 1342-1354, if the page is an derived page, then the VCL loads the master page .xml.php file first, then loads the descendant .xml.php file. This is fine, until PHP sessions kick in. The VCL performs the actual resource loading in readFromResource, located online 1386. You'll notice that the first thing that function does is check whether the page has been sessioned or not. The bug comes, when the page has been sessioned, and the call is made to load the master page and child page resources. Because the session is present, the readFromResource function duplicates all the page child controls, because it doesn't load the .xml.php, but rather uses the php session, which contains all the page child controls. The fix seems to be simple, just add a check to see whether the session is present before loading the master page resource. Eg: Line 1342: if (!isset($_SESSION['comps.'.$this->className()]) && !$inherited) Attached is a patch file for this fix. Jon |
From: <pac...@pa...> - 2007-06-26 22:04:50
|
Dan, the only way around this is to set a session variable that ajax is in use or that initialisation has occurred and not to do it again for the current session. When the Ajax server side method is a method of the Page class it will load and reinstantiate that form and all its dependent objects like datamodules all over again. So if you have a data connection enabled or a query active in a datamodule those data calls will be reexecuted as a side effect of launching the server side function. Sometimetimes you will want the whole page other times you may just want to do something else. But you will have to roll your own but it is a poorly thoughtout design and very inefficient and not very scalable I will agree about that. Xajax does allow you to specifiy the name of a php file as well as the function to call. However the VCL does not currently implement it . It defaults to the current page and a POST to boot. The javascript echo ajaxcall can be adjusted to submit a different php include file and also to limit the payload going back to the server by specifying a prefix string that means it selects only certain subsets of the forms dhtml to go back to the server. So not only is the form being reinstantiated server side the whole guts is being sent back to the server over xmlhhttp even if you are just changing a caption. There is an attempt to limit server side processing in later VCL's by usng $comps array of form elements to process server side. Unfortunately other aspects of those VCL versions are broken so its difficult to get ajax working without all kinds of side effects. >>-----Original Message----- >Subject: Re: [vcl4php-developers] Bad Ajax Response - getting page >> >>Through experimenting more, I found that the response returned is >>effected by more than the function you call. >> |
From: FrozenDice <fro...@gm...> - 2007-06-26 21:32:32
|
I'm just using oncreate, to get any file that was posted to this script, parse it, setup menus, and other visual components, so it has to be the very first thing run. Also OnStartBody and OnShowHeader also will execute just like OnCreate. This whole mess is probably because D4PHP is using the getFormValues rather than registerFunction. Basically it's submitting the entire form then getting a response. All I want to do is call a specific function, but D4PHP isn't made to do that, since it only does form values. I just sort of realized this. I'll probably have to implement xajax manually so I can execute just a single function. - Dan On 6/26/07, Rob Wilkens <rob...@gm...> wrote: > I understand and agree... However, every time you 'execute' the page > you're probably going to run 'create'. Perhaps you are using 'create' > wrong?? Take a look at the list of events for a page... Perhaps you > can use OnShowHeader to insert code you want to put in the header, or > OnStartBody to insert code you want to always have in the body > section. > > Hope this helps, and please, if it doesn't, tell me so I can try to > understand what you're doing. I haven't done a lot w/ D4PHP yet so I > don't know what kind of scenarios you've run into that I haven't. > > -Rob > > On 6/26/07, FrozenDice <fro...@gm...> wrote: > > It took me a second to realize why there was no problem. It's because > > the add row button is being clicked by the user. Try setting the > > function that the addrow button has to the onCreate of the form, and > > you'll notice that every time ajax is called it also trips that > > function, which would add a new row on every click of the ajax time > > button. Which is what we don't want to have happen. > > > > - Dan > > > > On 6/26/07, Rob Wilkens <rob...@gm...> wrote: > > > Add Row button is server side. It's just a page I had up for another purpose. > > > > > > The AJAX button works. Click it, wait about 3 seconds, and it > > > updates. The problem you may be seeing is that it gets cut-off where > > > the timestamp is because i made the button too narrow. > > > > > > -Rob > > > > > > On 6/26/07, FrozenDice <fro...@gm...> wrote: > > > > Is the add row button using ajax or server side events? If it's using > > > > a server side event how is it not being triggered by the ajax button > > > > also? It looks like it's ajax since I don't see the "clicked by ajax" > > > > button refresh, unless it's just too quick. > > > > > > > > - Dan > > > > > > > > ---- Quote Reply ------------------------------------------------ > > > > I noticed if I go to the archives and select "Flat View" (as opposed > > > > to ultimate) then the posts are easier to find, your last post did go > > > > through. Still, I'm glad you asked again as it gave me a chance to > > > > experiment and learn. > > > > > > > > It worked for me, here's what I did: > > > > (1) Set UseAjax = True for the Form, place a button... > > > > (2) Set a Javascript onclick event which did the following: > > > > function Button2JSClick($sender, $params) > > > > { > > > > echo $this->Button2->ajaxCall("DoSomething"); > > > > > > > > ?> > > > > //Add your javascript code here > > > > return false; > > > > <?php > > > > > > > > } > > > > (3) Implemented DoSomething: > > > > function DoSomething($sender, $params) > > > > { > > > > $this->Button2->Caption="clicked Ajax ".date("Y-m-d H:i:s"); > > > > } > > > > > > > > I *TEMPORARILY* posted a working AJAX demo here (the bottom button > > > > uses AJAX, the top button does not). It is not guaranteed to be up at > > > > all times. > > > > > > > > http://robwilkens.com/TableDemo.php > > > > > > > > -Rob > > > > > > > > > > > > > -- > > > Rob Wilkens > > > http://RobWilkens.com > > > 516-874-0579 > > > > > > > > -- > Rob Wilkens > http://RobWilkens.com > 516-874-0579 > |