Accueil → WINDEV 22 → Parameters in WebDev static site
Parameters in WebDev static site
Débuté par John Fligg, 08 mai 2018 18:19 - 5 réponses
Posté le 08 mai 2018 - 18:19
I have a Static Site and am trying to find a way to pass a parameter to another page.

I cannot use a database and all attempts to save to a text file are not allowed. Such as IniWrite, fExtractResource, fLoadText

Is there any way I can store a value of something and use that value to load on another page?

Posté le 08 mai 2018 - 18:38
Hi. If you use HTML5 you have the option of store persistent data. Look at the help. Exist a functions group to manage this information. Consult the WLanguaje book for examples.

Posté le 08 mai 2018 - 18:44
I thought was for AWP sites? Also not available in WebDev.

Ah maybe I can use a WebService. Never used one in a Static site but will see.

Yes seems to work. Duh!!!
Posté le 08 mai 2018 - 21:54

in a static site, you have all the browser side code available. Only the server side is not... As you can open a page in browser code and pass it any parameter you want, there shouldn't be any problem

Best regards
Posté le 10 mai 2018 - 09:02
Agreed Fabrice. But am I being stupid?

Pass the parameter in but how do you declare the receiving parameter in the Static page being called? All I have is Load(Onload), Unload, Click etc. available and cannot declare a procedure there such as Page_ABC(param). What am I missing?

Posté le 10 mai 2018 - 16:13

You need to do that in JS code

the following code will return the full url

window.alert(window.location.href )

Just put it in a browser JS procedure and run it in the onload and you'll get the whomle thing, you can then extract what you need

Best regards