PC SOFT

PROFESSIONAL NEWSGROUPS
WINDEVWEBDEV and WINDEV Mobile

Home → WEBDEV 25 → Passing parameters to site (webdev 25)
Passing parameters to site (webdev 25)
Started by Paulino Rosemberg, Sep., 19 2020 2:12 AM - 4 replies
Registered member
9 messages
Posted on September, 19 2020 - 2:12 AM
I am new to webdev.

I am trying to code a site which will be called with several input parameters.
1) How do I test it (i.e. is there a place to store debug/run parameters?

I had written in windev express 24 a little app and I could (on the site code) create a set of global variables. The site that I am creating has 1 window that should read the parameters, get some more info from the user and then get some data from an external site and show it to the user.

Where do I write the placeholder for the parameters (on this single page I see "Global declarations for this page (server) Initializing of page *server" and load page on browser, I want to have these variables in the browser and not bother the server.

Do I use PageParameter, and since a have a few use syntax like <Result> = PageParameter(<Parameter name> [, <Encoding>]
<Parameter name 2>, value ....)

Thanks in advance.

Paul

--
Paul Rosemberg
Posted on September, 21 2020 - 12:47 PM
>>>Where do I write the placeholder for the parameters (on this single page I see "Global declarations for this page (server) Initializing of page *server" and load page on browser, I want to have these variables in the browser and not bother the server.<<<

the 'not bother the server' part of your question makes me think that you are new not only to webdev but to web development in general...

There is no such thing as 'not bothering the server', when a user enters a URL, either by hand or by clicking on a link, this WILL go to your server. That's the way it works.

So before going any further, I suggest that you start by studying in details the tutorials coming with webdev, and also at a minimum watch Fabrice's webdev development philosophy course here . He has a few other webdev courses that may interest you also available on his channel.
Posted on September, 21 2020 - 9:06 PM
Thanks for the quick response.

You are right. From a production standpoint this is the first site I am coding. Enjoyed Fabrice talk and saw the similarities of web programming and windows programming. Like Windows the web is event driven and if I don't program the before and after event , or test if it is a "refresh" or first time for a page it will not work.

I was hoping for a response to my question. I am used to Visual Studio environment where you can simulate the run by coding debug parameters values. Where and how can I do this in webdev? I can hardcore global variables in the server side, But do I use the "parameter" code I had submitted and replace the hardcoded values with queries to the parameters during production time?

Thanks in advance.

PS> I had also submitted a question about the css on a button not working.
Registered member
9 messages
Posted on September, 21 2020 - 9:48 PM
Thank you Argus.

Indeed this is my first endeavor in the web world. I have a lot of experience designing and coding windows apps. That said I enjoyed Fabrici talk it showed me a lot of similarities between both worlds. In an event based application you have to code for a before and after event for it to works. He is very clear and knowledgeable.

I am still looking for the answer to my question (maybe not so well formulated) I see that in order for my app to work as designed I have to write in the server initialization global variables code to assign values so that they can be used in the app. Coming from Visual Studio I am used to hardcode test values for an app. I can hardcode values here, but I think (don't know) that I will have to use the parameters option of webdev to accomplish this in the cloud, so I am looking for some help.

Also I had posted a question about the CSS values for a generic button being rejected by webdev. If this is not the place to ask, I'd appreciated being redirected to the proper place.

Thanks in advance

Paul Rosemberg

--
Paul Rosemberg
Registered member
9 messages
Posted on October, 13 2020 - 5:50 PM
I am not sure how to "close" this post. But I did have some help on the issue. So just in case a "newbie" like me stumbles here I am showing how to "pass parameter" in test mode.

The green icon "Go" has a popup option (arrow) and one of the options is to "Configure Test Mode" one of the boxes that show up in the form lets you enter a command line to be used as parameters for the site test.

In the initialization code for the site (server) I receive the value of the command line as a string and use Webdev function StringSplit() to parse its values and distribute it among the variables that I need as "startup" for the site

Later on when the user has filled out a questionnaire on the site I used a global procedure to query a third party database and return the value

Hope this helps

Paul Rosemberg

--
Paul Rosemberg