NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: walter.dasilva on March 01, 2012, 04:28:58 AM
-
I have some global variable that i´m using to define same blogal parameters like webserver port.
this one is saved on INI file and it´s working nice.
so, i´ve created a web form to make changes in this global variable but the fields in form come with zero. this form has default action as change.
what´s wrong?
thank´s
-
I tried a similar setup here, and it seemed ok.
Can you tweak one of the examples to duplicate the effect and post here please?
cheers
Bruce
-
it´s here Bruce
Thanks
[attachment deleted by admin]
-
um - you're example looks fine, except you're not loading the INI value when the WebServer starts.
ie in WebServer;
INIMgr.Fetch('WebServer','WBPorta',dg:WBPorta)
One minor issue is if the user cancels the form, then for a period the global variable has been cleared. I have tweaked the 6.24 code to avoid this problem.
(aside: changing the port number of the server itself is slightly complex because the server would need to be stopped and restarted, and of course the user would then effectivly need to enter a new url to continue. But that's a very special case and outside the scope of this question I think.)
Cheers
Bruce
-
Hi Bruce,
Yes, i´m reading INI from Global Embeed/Program Setup. i´m moving it to webserver.
I have other variable that i´m using as global and the main propose is make webapp free of agents. the users could be configure it all from web. that will be running as a service.
thanks
-
Hi Bruce,
I´ve moved INI.fetch to webserver.ini, just before webserver.open and it still opem form with blank field
cheers
-
pop the field on your web server procedure so you can see it's value.
then debug your ini write, and ini read and see if it's writing, and reading correctly.
Your example is working fine here.
cheers
Bruce
-
Hi Bruce,
reading and writing INI is OK. i´m showing the INI value on webserver and it´s ok. but form still openning with blank field.
Cheers,
-
Hi Bruce,
Watch it http://www.softvale.com.br/downloads/capesoft/formfrommemory.html
Cheers,