Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2011-11

FCL Web Combined Demo

10 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Dimitrios Chr. Ioannidis

Hi all,

i wanted to check the combined demo so i set it up to my server at http://demo.artesoft.gr/combined .

As i'm newbie to javascript can someone check to see why doesn't work with IE ? With Firefox, Chrome, Safari worked.

regards,

Dimitrios Chr. Ioannidis
Unknown author
to Dimitrios Chr. Ioannidis: i wanted to check the combined demo so i set it up to my server at…

IE has a bug that causes it to report an error if the last element in an array or object is empty. (it is explicitly mentioned in the standard that it is allowed).

So you should search for a , in front of } and ] and remove it.

Attached is a cleaned-up version of users.js, where I corrected 3 occurrences.

Michael.

Dimitrios Chr. Ioannidis wrote 17 lines
Hi all, i wanted to check the combined demo so i set it up to my server at http://demo.artesoft.gr/combined . As i'm newbie to javascript can someone check to see why doesn't work with IE ? With Firefox, Chrome, Safari worked. regards, -- Dimitrios Chr. Ioannidis _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Marcos Douglas
to Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho wrote 5 lines
Hello, How did you generate that grid? You wrote your own html+javascript or are you using a ready made javascript library or something else?

I think he uses ExtJS library.

Marcos Douglas

Unknown author
to Dimitrios Chr. Ioannidis: Thx. I fixed the script and it worked. Dimitrios Chr. Ioannidis
Dimitrios Chr. Ioannidis wrote 11 lines
On 21/11/2011 1:28 μμ, wrote: > > IE has a bug that causes it to report an error if the last element in an > array or object is empty. (it is explicitly mentioned in the standard that > it is allowed). > > So you should search for a , in front of } and ] and remove it. > Thx. I fixed the script and it worked.

Did you need to do additional fixes beyond the ones I did ?

Michael.

Dimitrios Chr. Ioannidis
to Unknown author
Show quoted text 20 lines
On Mon, 21 Nov 2011, Dimitrios Chr. Ioannidis wrote: > > On 21/11/2011 1:28 μμ, wrote: >> >> IE has a bug that causes it to report an error if the last element >> in an >> array or object is empty. (it is explicitly mentioned in the >> standard that >> it is allowed). >> >> So you should search for a , in front of } and ] and remove it. >> > > Thx. I fixed the script and it worked. Did you need to do additional fixes beyond the ones I did ?

For the users.js file no i didn't.

The changes for the demo to work was, a modification of the combined.cgi path in users.js and login.js and in the Database the addition of the BU Trigger to protect the demo user.

CREATE GENERATOR GEN_USERS;

CREATE TABLE USERS
(
U_ID Bigint NOT NULL,
U_LOGIN Varchar(40) NOT NULL,
U_NAME Varchar(30) NOT NULL,
U_EMAIL Varchar(100),
U_PASSWORD Varchar(100) NOT NULL,
CONSTRAINT PK_FPCUSERS PRIMARY KEY (U_ID),
CONSTRAINT U_USERNAME UNIQUE (U_LOGIN)
);

CREATE EXCEPTION DEMOUSER
'Demo user deletion or update Prohibited !';
/******************** TRIGGERS ********************/

SET TERM ^ ;
CREATE TRIGGER USERS_BD_BU FOR USERS ACTIVE
BEFORE UPDATE OR DELETE POSITION 0
AS
BEGIN
IF (OLD.U_ID = 1) THEN EXCEPTION DEMOUSER;
END^
SET TERM ; ^
SET TERM ^ ;
CREATE TRIGGER USERS_BI FOR USERS ACTIVE
BEFORE INSERT POSITION 0
AS
DECLARE VARIABLE tmp DECIMAL(18,0);
BEGIN
IF (NEW.U_ID IS NULL) THEN
NEW.U_ID = GEN_ID(GEN_USERS, 1);
ELSE
BEGIN
tmp = GEN_ID(GEN_USERS, 0);
if (tmp < new.U_ID) then
tmp = GEN_ID(GEN_USERS, new.U_ID-tmp);
END
END^
SET TERM ; ^
GRANT DELETE, INSERT, REFERENCES, SELECT, UPDATE
ON USERS TO SYSDBA WITH GRANT OPTION;

regards,

Dimitrios Chr. Ioannidis
Dimitrios Chr. Ioannidis
to Felipe Monteiro de Carvalho: How did you generate that grid? You wrote your own html+javascript or are you using a…

Hi,

Felipe Monteiro de Carvalho wrote 5 lines
Hello, How did you generate that grid? You wrote your own html+javascript or are you using a ready made javascript library or something else?

i just used the js from the example " <fpc
source>\packages\fcl-web\examples\combined ". It uses the ExtJs 3.x version series not the 4.x .

regards,

Dimitrios Chr. Ioannidis