NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: Poul Jensen on March 13, 2019, 01:20:23 AM
-
Hi,
See attached pic with 3 issues:
1) How do I get rid of the tab. I have removed the "General" but it still shows.
2) How do I properly align the second columns fields similar to first column.
3) On a button / OnClick tab I call a source procedure with a parameter. Clicking this gives a 404 error:
Generated URL (looks OK): http://localhost:88/KoebeVare?UY9JW16LOIXWZ4CL
Debugview:
[st] [netTalk][thread=3] SendError = 404 The page cannot be found : The page you are looking for might have been removed, had its name changed, or is temporarily unavailable. FileRequest=[KoebeVare]
From the logwindow:
GET /KoebeVare?UY9JW16LOIXWZ4CL HTTP/1.1
Host: localhost:88
Connection: keep-alive
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Referer: http://localhost:88/UpdateAPPvarer
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9,da;q=0.8
Cookie: SESSIONIDX=BXNiHdM0D1F0zMCD9l3isODFL3FDEM
What am I missing her.
tia
/Poul
-
I have now (partly) solved issue 1 & 2. See attached.
Cheers
/Poul
-
Hi,
To send a parameter you must also name the variable name in the url, like:
http://localhost:88/KoebeVare?myvar=UY9JW16LOIXWZ4CL
A second or 3rd or 10th parameter is separated by "&", like:
http://localhost:88/KoebeVare?myvar=UY9JW16LOIXWZ4CL&my2ndvar=3DEIH4XRTYUHN5jA
In the procedure, right after "CODE" you do:
p_web.storevalue('myvar')
p_web.storevalue('my2ndvar')
From that moment you have session variables "myvar" and "my2ndvar"at your disposal.
Cheers,
Rene
-
Hi Rene,
>> 3) On a button / OnClick tab I call a source procedure with a parameter. Clicking this gives a 404 error:
Source procedures are not "pages" so you can't call them as a URL.
Either;
a) you are intending to goto a page, in which case use a NetWebBrowse, NetWebForm or NetWebPage template procedure or
b) you are intending to remain on this page, and just do "some server side code" - in which case remove your items from the OnClick tab and add your code to the Server-Side-Code on the Client-Side tab.
cheers
Bruce
-
Hi Bruce,
In my defence :
I only looked at the url part in Poul's message, where I noticed that the parameter part was not correct.
Ren
[Bruces note : sorry Rene, I meant to address the previous message to Poul - brain fart...]
-
Thanks Rene & Bruce,
Still strugling with this (been doing H5-work for a couple of years, and most things are much easier there, but of course with other limitations ;) ).
@Bruce:
Server-Side-Code on the Client-Side tab: is this not javascript code I have to place here ?
I need to do some Clarion coding. How do I do that ?
Cheers
/Poul
-
Hi Poul,
Server-Side code runs on the server, in Clarion, so no, not JavaScript.
I recommend that you put something in there to "mark the place" then go back to the app tree, to the procedure, and take a look at the code "in context".
The key thing to remember here is that you always use and set Session values, not just raw variable values.
Cheers
Bruce
-
Thanks Bruce.