html support
Josef Frydl <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <[email protected]> |
Any help of experience swi-prolog html server would be greatly welcomed.
I tried to use the form to gather information into growing list of facts.
First : IS tgere right way to do it? I could not figure it ou. So I tried to use form to collect group of strings and one of the choice from exclusive group.
I use the form this way :
form([action='/gather'], [
p([], [
label([for=name],'Name of fragments :'),
etc
:- http_handler('/gather', eval_fragment, []).
and to debug it
eval_fragment(Request) :-
http_redirect(moved, '/',Request),
http_read_data(Request, Data, []),
portray_clause(Data),
byl_jsem,
nb_getval(counter, C), CNew is C + 1, nb_setval(counter, CNew).
byl_jsem :- write("I was here").
With or without http_redirect(moved, '/',Request), byl_jsem predicated will never get invoked. end counter stays on 0.
Is there any way to specify which methods should be seen globally ? or form the same URL , OR is there some other way to just invoke method with data. It is possible to do it in XPCE. But there is no way
to build complete page in XPCE. OR would just plain HTML be the best option. if I can only invoke the I am using Prolog for further processing (DCG).
At this point I would appreciate any advice, including do not use prolog.
Thanks Josef Frydl