This topic is locked

add new button feature.

3/15/2010 5:30:54 PM
PHPRunner General questions
T
tkjerulf author

PHPR build 5106

Playing with the somewhat new feature "add button", seem to me only be working partly...

  1. im leaving the javascript onBefore as is.
  2. im editing the php server side with:

    global $dal;

    $dal->Table["arg_broadcast"]->Value["subject"]="First event";

    $dal->Table["arg_broadcast"]->Add();

    $result["txt"] = $params["txt"]." world!";
  3. leaving the js, onAfter as is.
    For some reason the output is: Sending request to server...

    and the record is never added to the table.
    I succeeded once to get a message from the onAfter event. A record was not added here as well.
    so if anyone could guide me in the right direction....

Sergey Kornilov admin 3/15/2010

Correct server code is

global $dal;

$dal->Table("arg_broadcast")->Value["subject"]="First event";

$dal->Table("arg_broadcast")->Add();

$result["txt"] = $params["txt"]." world!";
T
tkjerulf author 3/18/2010



Correct server code is

global $dal;

$dal->Table("arg_broadcast")->Value["subject"]="First event";

$dal->Table("arg_broadcast")->Add();

$result["txt"] = $params["txt"]." world!";



ok, anyway i cant get the data access layer to work, either with () or [] using the button.

here's a part of the manual >advanced topics>dal>
global $dal;$dal->Table["UsersTable"]->Param["ID"]=32;

$rs = $dal->Table["UsersTable"]->FetchByID();

$data = db_fetch_array($rs);

J
Jane 3/19/2010

Hi,
there is an error in the Help. We'll update it.

If you code doesn't work publish your project on Demo Account and open a ticket at http://support.xlinesoft.com sending a URL to your pages along with instructions on reproducing this error.