Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP to JavaScript
Message
From
07/11/2016 06:03:10
 
 
General information
Forum:
Visual FoxPro
Category:
FoxInCloud
Environment versions
Visual FoxPro:
VFP 9 SP2
Database:
MS SQL Server
Miscellaneous
Thread ID:
01642712
Message ID:
01642817
Views:
96
Hi Viv,

Here are solutions in pseudo-code:

>Does FIC generate the html on the fly when a page request is received or is html/javascript 'pre-compiled'?

On the fly at first user request since server started.


>If I wanted to add html or javascript to a page where/when would I do it ?

add HTML:
procedure someControl.wcHTMLgen
lparameters toHTMLgen, tlInnerHTML
this.wcHTML = toHTMLgen.getHTML() + 'additional HTML'
add JavaScript:
procedure someControl.wcHTMLgen
lparameters toHTMLgen, tlInnerHTML
toHTMLgen.cScriptJSadd("some JavaScript")
process an event with custom JavaScript:
procedure someControl.someEvent
if thisForm.wlHTMLgen
  return "some JS event handler"
endif
> And if I wanted to move a specific page to a non-FIC solution ?
procedure xxxFrm.wForm && form 'base class' provided by FoxInCloud Adaptation Assistant
lparameters tcForm, tuFormCallBack, t01,t02,t03,t04,t05,t06,t07,t08,t09,t10,t11,t12,t13,t14,t15,t16,t17,t18,t19,t20
if inlist(m.tcForm, 'forms', 'processed', 'by', 'aspx')
  response.redirect(textmerge([<<tcForm>>.aspx?parms=<<t01,t02,...,t20>>])) && aspx for example
endif
For a deeper understanding, you may find these documents useful:
Understanding FoxInCloud
What are adaptations for? (VFP app running on Desktop –vs– Web Server)
Thierry Nivelet
FoxinCloud
Give your VFP application a second life, web-based, in YOUR cloud
http://foxincloud.com/
Never explain, never complain (Queen Elizabeth II)
Previous
Reply
Map
View

Click here to load this message in the networking platform