FoxInCloud
FoxInCloud.propchange issue
Gravatar is a globally recognized avatar based on your email address. FoxInCloud.propchange issue
  Tuvia Vinitsky
  All
  Nov 2, 2015 @ 08:06pm
I frequently in my xxx.js use something like this:

FoxInCloud.PropChange(null, tControl.id, 'value', tControl.value);

But now that produces an error that FoxInCloud does not support my browser:

Gravatar is a globally recognized avatar based on your email address. Re: FoxInCloud.propchange issue
  FoxInCloud Support - Thierry N.
  Tuvia Vinitsky
  Nov 2, 2015 @ 11:11pm
Make sure to pass a reference to the HTML event object:

FoxInCloud.PropChange(event, tControl.id, 'value', tControl.value);


I frequently in my xxx.js use something like this:

FoxInCloud.PropChange(null, tControl.id, 'value', tControl.value);

But now that produces an error that FoxInCloud does not support my browser:


-- thn (FoxInCloud)

Gravatar is a globally recognized avatar based on your email address. Re: FoxInCloud.propchange issue
  Tuvia Vinitsky
  Thierry Nivelet (FoxInCloud)
  Nov 3, 2015 @ 06:34am
Sorry, that was the problem.

Is there a way i can set .Value properties in the DOM and have FiC only read them at a later point:

IOW, I have a form with 30 comboboxes and one button. When the user selects various values in the comboboxes, it makes other comboxes on the form become visible or not visible. Rather than keep making trips to the server, I added some JS code to do that easily.

Then when the button .Click fires, VFP reads all the combobox values and performs certain actions.

Setting the DOM control.value only helps me so far if I also make a call to PropChange - but then I am still making calls to the server.

My backup plan is to have the button .Click execute JS code before the VFP code that polls all the combobox values.


Make sure to pass a reference to the HTML event object:

FoxInCloud.PropChange(event, tControl.id, 'value', tControl.value);


I frequently in my xxx.js use something like this:

FoxInCloud.PropChange(null, tControl.id, 'value', tControl.value);

But now that produces an error that FoxInCloud does not support my browser:


Gravatar is a globally recognized avatar based on your email address. Re: FoxInCloud.propchange issue
  FoxInCloud Support - Thierry N.
  Tuvia Vinitsky
  Nov 3, 2015 @ 10:15am
Here is a code outline

procedure combobox.valid
if thisform.wlHTMLgen
return textmerge([someFunction('', this.value);])
endif

procedure commandButton.click
lparameter toValues
if thisform.wlHTMLgen
return textmerge([FoxInCloud.MethExec('', 'Click', window.comboValues);])
endif

if vartype(m.toValues) == 'O'
local aProp[1], iProp, cProp
for iProp = 1 to aMember(aProp, m.toValues)
cProp = m.aProp[m.iProp]
store evaluate('m.toValues.' + m.cProp) to ('thisForm.' + strtran(m.cProp, '_', '.'))
endfor
endif

... process values ....

function someFunction(comboID, comboValue){
if (!window.comboValues) window.comboValues = {};
window.comboValues[comboID] = comboValue;
}


Sorry, that was the problem.

Is there a way i can set .Value properties in the DOM and have FiC only read them at a later point:

IOW, I have a form with 30 comboboxes and one button. When the user selects various values in the comboboxes, it makes other comboxes on the form become visible or not visible. Rather than keep making trips to the server, I added some JS code to do that easily.

Then when the button .Click fires, VFP reads all the combobox values and performs certain actions.

Setting the DOM control.value only helps me so far if I also make a call to PropChange - but then I am still making calls to the server.

My backup plan is to have the button .Click execute JS code before the VFP code that polls all the combobox values.


Make sure to pass a reference to the HTML event object:

FoxInCloud.PropChange(event, tControl.id, 'value', tControl.value);


I frequently in my xxx.js use something like this:

FoxInCloud.PropChange(null, tControl.id, 'value', tControl.value);

But now that produces an error that FoxInCloud does not support my browser:



Gravatar is a globally recognized avatar based on your email address. Re: FoxInCloud.propchange issue
  Tuvia Vinitsky
  Thierry Nivelet (FoxInCloud)
  Nov 5, 2015 @ 12:42pm
When it does this:
return textmerge([FoxInCloud.MethExec('', 'Click', window.comboValues);])

I get the following error:



Here is a code outline

procedure combobox.valid
if thisform.wlHTMLgen
return textmerge([someFunction('', this.value);])
endif

procedure commandButton.click
lparameter toValues
if thisform.wlHTMLgen
return textmerge([FoxInCloud.MethExec('', 'Click', window.comboValues);])
endif

if vartype(m.toValues) == 'O'
local aProp[1], iProp, cProp
for iProp = 1 to aMember(aProp, m.toValues)
cProp = m.aProp[m.iProp]
store evaluate('m.toValues.' + m.cProp) to ('thisForm.' + strtran(m.cProp, '_', '.'))
endfor
endif

... process values ....

function someFunction(comboID, comboValue){
if (!window.comboValues) window.comboValues = {};
window.comboValues[comboID] = comboValue;
}


Sorry, that was the problem.

Is there a way i can set .Value properties in the DOM and have FiC only read them at a later point:

IOW, I have a form with 30 comboboxes and one button. When the user selects various values in the comboboxes, it makes other comboxes on the form become visible or not visible. Rather than keep making trips to the server, I added some JS code to do that easily.

Then when the button .Click fires, VFP reads all the combobox values and performs certain actions.

Setting the DOM control.value only helps me so far if I also make a call to PropChange - but then I am still making calls to the server.

My backup plan is to have the button .Click execute JS code before the VFP code that polls all the combobox values.


Make sure to pass a reference to the HTML event object:

FoxInCloud.PropChange(event, tControl.id, 'value', tControl.value);


I frequently in my xxx.js use something like this:

FoxInCloud.PropChange(null, tControl.id, 'value', tControl.value);

But now that produces an error that FoxInCloud does not support my browser:




Gravatar is a globally recognized avatar based on your email address. Re: FoxInCloud.propchange issue
  FoxInCloud Support - Thierry N.
  Tuvia Vinitsky
  Nov 5, 2015 @ 09:50pm
oops, I see no relation between the JS returned and the fact that the form has not instantiated
could you choose suspend an post the full debugger window (eg like below)
ftp://foxincloud.com/Screenshots/FiC/debugger-degug-frame.PNG


When it does this:
return textmerge([FoxInCloud.MethExec('', 'Click', window.comboValues);])

I get the following error:



Here is a code outline

procedure combobox.valid
if thisform.wlHTMLgen
return textmerge([someFunction('', this.value);])
endif

procedure commandButton.click
lparameter toValues
if thisform.wlHTMLgen
return textmerge([FoxInCloud.MethExec('', 'Click', window.comboValues);])
endif

if vartype(m.toValues) == 'O'
local aProp[1], iProp, cProp
for iProp = 1 to aMember(aProp, m.toValues)
cProp = m.aProp[m.iProp]
store evaluate('m.toValues.' + m.cProp) to ('thisForm.' + strtran(m.cProp, '_', '.'))
endfor
endif

... process values ....

function someFunction(comboID, comboValue){
if (!window.comboValues) window.comboValues = {};
window.comboValues[comboID] = comboValue;
}


Sorry, that was the problem.

Is there a way i can set .Value properties in the DOM and have FiC only read them at a later point:

IOW, I have a form with 30 comboboxes and one button. When the user selects various values in the comboboxes, it makes other comboxes on the form become visible or not visible. Rather than keep making trips to the server, I added some JS code to do that easily.

Then when the button .Click fires, VFP reads all the combobox values and performs certain actions.

Setting the DOM control.value only helps me so far if I also make a call to PropChange - but then I am still making calls to the server.

My backup plan is to have the button .Click execute JS code before the VFP code that polls all the combobox values.


Make sure to pass a reference to the HTML event object:

FoxInCloud.PropChange(event, tControl.id, 'value', tControl.value);


I frequently in my xxx.js use something like this:

FoxInCloud.PropChange(null, tControl.id, 'value', tControl.value);

But now that produces an error that FoxInCloud does not support my browser:





Gravatar is a globally recognized avatar based on your email address. Re: FoxInCloud.propchange issue
  Tuvia Vinitsky
  Thierry Nivelet (FoxInCloud)
  Nov 6, 2015 @ 09:05am


oops, I see no relation between the JS returned and the fact that the form has not instantiated
could you choose suspend an post the full debugger window (eg like below)
ftp://foxincloud.com/Screenshots/FiC/debugger-degug-frame.PNG


When it does this:
return textmerge([FoxInCloud.MethExec('', 'Click', window.comboValues);])

I get the following error:



Here is a code outline

procedure combobox.valid
if thisform.wlHTMLgen
return textmerge([someFunction('', this.value);])
endif

procedure commandButton.click
lparameter toValues
if thisform.wlHTMLgen
return textmerge([FoxInCloud.MethExec('', 'Click', window.comboValues);])
endif

if vartype(m.toValues) == 'O'
local aProp[1], iProp, cProp
for iProp = 1 to aMember(aProp, m.toValues)
cProp = m.aProp[m.iProp]
store evaluate('m.toValues.' + m.cProp) to ('thisForm.' + strtran(m.cProp, '_', '.'))
endfor
endif

... process values ....

function someFunction(comboID, comboValue){
if (!window.comboValues) window.comboValues = {};
window.comboValues[comboID] = comboValue;
}


Sorry, that was the problem.

Is there a way i can set .Value properties in the DOM and have FiC only read them at a later point:

IOW, I have a form with 30 comboboxes and one button. When the user selects various values in the comboboxes, it makes other comboxes on the form become visible or not visible. Rather than keep making trips to the server, I added some JS code to do that easily.

Then when the button .Click fires, VFP reads all the combobox values and performs certain actions.

Setting the DOM control.value only helps me so far if I also make a call to PropChange - but then I am still making calls to the server.

My backup plan is to have the button .Click execute JS code before the VFP code that polls all the combobox values.


Make sure to pass a reference to the HTML event object:

FoxInCloud.PropChange(event, tControl.id, 'value', tControl.value);


I frequently in my xxx.js use something like this:

FoxInCloud.PropChange(null, tControl.id, 'value', tControl.value);

But now that produces an error that FoxInCloud does not support my browser:






Gravatar is a globally recognized avatar based on your email address. Re: FoxInCloud.propchange issue
  FoxInCloud Support - Thierry N.
  Tuvia Vinitsky
  Nov 9, 2015 @ 07:34am
Tuvia,

I need to reproduce the issue to understand what happens -- will create a form in http://foxincloud.com/tutotest/



oops, I see no relation between the JS returned and the fact that the form has not instantiated
could you choose suspend an post the full debugger window (eg like below)
ftp://foxincloud.com/Screenshots/FiC/debugger-degug-frame.PNG


When it does this:
return textmerge([FoxInCloud.MethExec('', 'Click', window.comboValues);])

I get the following error:



Here is a code outline

procedure combobox.valid
if thisform.wlHTMLgen
return textmerge([someFunction('', this.value);])
endif

procedure commandButton.click
lparameter toValues
if thisform.wlHTMLgen
return textmerge([FoxInCloud.MethExec('', 'Click', window.comboValues);])
endif

if vartype(m.toValues) == 'O'
local aProp[1], iProp, cProp
for iProp = 1 to aMember(aProp, m.toValues)
cProp = m.aProp[m.iProp]
store evaluate('m.toValues.' + m.cProp) to ('thisForm.' + strtran(m.cProp, '_', '.'))
endfor
endif

... process values ....

function someFunction(comboID, comboValue){
if (!window.comboValues) window.comboValues = {};
window.comboValues[comboID] = comboValue;
}


Sorry, that was the problem.

Is there a way i can set .Value properties in the DOM and have FiC only read them at a later point:

IOW, I have a form with 30 comboboxes and one button. When the user selects various values in the comboboxes, it makes other comboxes on the form become visible or not visible. Rather than keep making trips to the server, I added some JS code to do that easily.

Then when the button .Click fires, VFP reads all the combobox values and performs certain actions.

Setting the DOM control.value only helps me so far if I also make a call to PropChange - but then I am still making calls to the server.

My backup plan is to have the button .Click execute JS code before the VFP code that polls all the combobox values.


Make sure to pass a reference to the HTML event object:

FoxInCloud.PropChange(event, tControl.id, 'value', tControl.value);


I frequently in my xxx.js use something like this:

FoxInCloud.PropChange(null, tControl.id, 'value', tControl.value);

But now that produces an error that FoxInCloud does not support my browser:








-- thn (FoxInCloud)

Gravatar is a globally recognized avatar based on your email address. Re: FoxInCloud.propchange issue
  Tuvia Vinitsky
  Thierry Nivelet (FoxInCloud)
  Nov 18, 2015 @ 05:13pm
Can I ask the status of this? Thanks.


Tuvia,

I need to reproduce the issue to understand what happens -- will create a form in http://foxincloud.com/tutotest/



oops, I see no relation between the JS returned and the fact that the form has not instantiated
could you choose suspend an post the full debugger window (eg like below)
ftp://foxincloud.com/Screenshots/FiC/debugger-degug-frame.PNG


When it does this:
return textmerge([FoxInCloud.MethExec('', 'Click', window.comboValues);])

I get the following error:



Here is a code outline

procedure combobox.valid
if thisform.wlHTMLgen
return textmerge([someFunction('', this.value);])
endif

procedure commandButton.click
lparameter toValues
if thisform.wlHTMLgen
return textmerge([FoxInCloud.MethExec('', 'Click', window.comboValues);])
endif

if vartype(m.toValues) == 'O'
local aProp[1], iProp, cProp
for iProp = 1 to aMember(aProp, m.toValues)
cProp = m.aProp[m.iProp]
store evaluate('m.toValues.' + m.cProp) to ('thisForm.' + strtran(m.cProp, '_', '.'))
endfor
endif

... process values ....

function someFunction(comboID, comboValue){
if (!window.comboValues) window.comboValues = {};
window.comboValues[comboID] = comboValue;
}


Sorry, that was the problem.

Is there a way i can set .Value properties in the DOM and have FiC only read them at a later point:

IOW, I have a form with 30 comboboxes and one button. When the user selects various values in the comboboxes, it makes other comboxes on the form become visible or not visible. Rather than keep making trips to the server, I added some JS code to do that easily.

Then when the button .Click fires, VFP reads all the combobox values and performs certain actions.

Setting the DOM control.value only helps me so far if I also make a call to PropChange - but then I am still making calls to the server.

My backup plan is to have the button .Click execute JS code before the VFP code that polls all the combobox values.


Make sure to pass a reference to the HTML event object:

FoxInCloud.PropChange(event, tControl.id, 'value', tControl.value);


I frequently in my xxx.js use something like this:

FoxInCloud.PropChange(null, tControl.id, 'value', tControl.value);

But now that produces an error that FoxInCloud does not support my browser:








Gravatar is a globally recognized avatar based on your email address. Re: FoxInCloud.propchange issue
  FoxInCloud Support - Thierry N.
  Tuvia Vinitsky
  Nov 18, 2015 @ 10:10pm
Can I ask the status of this? Thanks.

Slipped out of my mind sorry -- will do probably today.


-- thn (FoxInCloud)

Gravatar is a globally recognized avatar based on your email address. Re: FoxInCloud.propchange issue
  FoxInCloud Support - Thierry N.
  Tuvia Vinitsky
  Nov 19, 2015 @ 04:35am
http://foxincloud.com/tutotest/valuesDelayed.tuto ready for your tests


Can I ask the status of this? Thanks.


Tuvia,

I need to reproduce the issue to understand what happens -- will create a form in http://foxincloud.com/tutotest/



oops, I see no relation between the JS returned and the fact that the form has not instantiated
could you choose suspend an post the full debugger window (eg like below)
ftp://foxincloud.com/Screenshots/FiC/debugger-degug-frame.PNG


When it does this:
return textmerge([FoxInCloud.MethExec('', 'Click', window.comboValues);])

I get the following error:



Here is a code outline

procedure combobox.valid
if thisform.wlHTMLgen
return textmerge([someFunction('', this.value);])
endif

procedure commandButton.click
lparameter toValues
if thisform.wlHTMLgen
return textmerge([FoxInCloud.MethExec('', 'Click', window.comboValues);])
endif

if vartype(m.toValues) == 'O'
local aProp[1], iProp, cProp
for iProp = 1 to aMember(aProp, m.toValues)
cProp = m.aProp[m.iProp]
store evaluate('m.toValues.' + m.cProp) to ('thisForm.' + strtran(m.cProp, '_', '.'))
endfor
endif

... process values ....

function someFunction(comboID, comboValue){
if (!window.comboValues) window.comboValues = {};
window.comboValues[comboID] = comboValue;
}


Sorry, that was the problem.

Is there a way i can set .Value properties in the DOM and have FiC only read them at a later point:

IOW, I have a form with 30 comboboxes and one button. When the user selects various values in the comboboxes, it makes other comboxes on the form become visible or not visible. Rather than keep making trips to the server, I added some JS code to do that easily.

Then when the button .Click fires, VFP reads all the combobox values and performs certain actions.

Setting the DOM control.value only helps me so far if I also make a call to PropChange - but then I am still making calls to the server.

My backup plan is to have the button .Click execute JS code before the VFP code that polls all the combobox values.


Make sure to pass a reference to the HTML event object:

FoxInCloud.PropChange(event, tControl.id, 'value', tControl.value);


I frequently in my xxx.js use something like this:

FoxInCloud.PropChange(null, tControl.id, 'value', tControl.value);

But now that produces an error that FoxInCloud does not support my browser:










-- thn (FoxInCloud)

Gravatar is a globally recognized avatar based on your email address. Re: FoxInCloud.propchange issue
  Tuvia Vinitsky
  Thierry Nivelet (FoxInCloud)
  Nov 19, 2015 @ 05:18am
Excellent


http://foxincloud.com/tutotest/valuesDelayed.tuto ready for your tests


Can I ask the status of this? Thanks.


Tuvia,

I need to reproduce the issue to understand what happens -- will create a form in http://foxincloud.com/tutotest/



oops, I see no relation between the JS returned and the fact that the form has not instantiated
could you choose suspend an post the full debugger window (eg like below)
ftp://foxincloud.com/Screenshots/FiC/debugger-degug-frame.PNG


When it does this:
return textmerge([FoxInCloud.MethExec('', 'Click', window.comboValues);])

I get the following error:



Here is a code outline

procedure combobox.valid
if thisform.wlHTMLgen
return textmerge([someFunction('', this.value);])
endif

procedure commandButton.click
lparameter toValues
if thisform.wlHTMLgen
return textmerge([FoxInCloud.MethExec('', 'Click', window.comboValues);])
endif

if vartype(m.toValues) == 'O'
local aProp[1], iProp, cProp
for iProp = 1 to aMember(aProp, m.toValues)
cProp = m.aProp[m.iProp]
store evaluate('m.toValues.' + m.cProp) to ('thisForm.' + strtran(m.cProp, '_', '.'))
endfor
endif

... process values ....

function someFunction(comboID, comboValue){
if (!window.comboValues) window.comboValues = {};
window.comboValues[comboID] = comboValue;
}


Sorry, that was the problem.

Is there a way i can set .Value properties in the DOM and have FiC only read them at a later point:

IOW, I have a form with 30 comboboxes and one button. When the user selects various values in the comboboxes, it makes other comboxes on the form become visible or not visible. Rather than keep making trips to the server, I added some JS code to do that easily.

Then when the button .Click fires, VFP reads all the combobox values and performs certain actions.

Setting the DOM control.value only helps me so far if I also make a call to PropChange - but then I am still making calls to the server.

My backup plan is to have the button .Click execute JS code before the VFP code that polls all the combobox values.


Make sure to pass a reference to the HTML event object:

FoxInCloud.PropChange(event, tControl.id, 'value', tControl.value);


I frequently in my xxx.js use something like this:

FoxInCloud.PropChange(null, tControl.id, 'value', tControl.value);

But now that produces an error that FoxInCloud does not support my browser:










Gravatar is a globally recognized avatar based on your email address. Re: FoxInCloud.propchange issue
  Tuvia Vinitsky
  Thierry Nivelet (FoxInCloud)
  Nov 21, 2015 @ 03:17pm
When I fire the commandbutton.Click, I get a property name error:


Here is a code outline

procedure combobox.valid
if thisform.wlHTMLgen
return textmerge([someFunction('', this.value);])
endif

procedure commandButton.click
lparameter toValues
if thisform.wlHTMLgen
return textmerge([FoxInCloud.MethExec('', 'Click', window.comboValues);])
endif

if vartype(m.toValues) == 'O'
local aProp[1], iProp, cProp
for iProp = 1 to aMember(aProp, m.toValues)
cProp = m.aProp[m.iProp]
store evaluate('m.toValues.' + m.cProp) to ('thisForm.' + strtran(m.cProp, '_', '.'))
endfor
endif

... process values ....

function someFunction(comboID, comboValue){
if (!window.comboValues) window.comboValues = {};
window.comboValues[comboID] = comboValue;
}


Sorry, that was the problem.

Is there a way i can set .Value properties in the DOM and have FiC only read them at a later point:

IOW, I have a form with 30 comboboxes and one button. When the user selects various values in the comboboxes, it makes other comboxes on the form become visible or not visible. Rather than keep making trips to the server, I added some JS code to do that easily.

Then when the button .Click fires, VFP reads all the combobox values and performs certain actions.

Setting the DOM control.value only helps me so far if I also make a call to PropChange - but then I am still making calls to the server.

My backup plan is to have the button .Click execute JS code before the VFP code that polls all the combobox values.


Make sure to pass a reference to the HTML event object:

FoxInCloud.PropChange(event, tControl.id, 'value', tControl.value);


I frequently in my xxx.js use something like this:

FoxInCloud.PropChange(null, tControl.id, 'value', tControl.value);

But now that produces an error that FoxInCloud does not support my browser:




Gravatar is a globally recognized avatar based on your email address. Re: FoxInCloud.propchange issue
  Tuvia Vinitsky
  Tuvia Vinitsky
  Nov 21, 2015 @ 03:22pm
Sorry, here are more specifics:

In combobox .Valid:

IF TYPE('m.thisform.wlhtmlgen') = "L" AND m.thisform.wlhtmlgen = .t.
RETURN [filterTows(event,this, '] + this.Parent.lblRefreshNeeded.wcID + [');cboFunction('', this.value);]

* return textmerge([someFunction('', this.value);])
ELSE

In xxx.js:

window.comboValues = {};
function comboValueCollect(id, value){
window.comboValues[id] = value;
};
function cboFunction(comboID, comboValue){
if (!window.comboValues) window.comboValues = {};
window.comboValues[comboID] = comboValue;
}

Then in commandbutton.Click:

If Thisform.wlHTMLgen
*RETURN .t.
*Return Textmerge([FoxInCloud.MethExec('', 'Click', window.comboValues);])
return textmerge([FoxInCloud.MethExec(event, '<<this.wcID>>', 'Click', window.comboValues);]) && see tuto.js
ENDIF

local aProp[1], iProp, cProp, aCombo[1], iCombo, oCombo as ComboBox

* SET STEP ON

* If Web mode, set comboboxes' values
if Vartype(m.toValues) == 'O' && Implicitely Web mode
for iProp = 1 to aMember(aProp, m.toValues)
cProp = m.aProp[m.iProp]
store evaluate('m.toValues.' + m.cProp) to ('thisForm.' + m.cProp + '.Value')
endfor
endif


When I fire the commandbutton.Click, I get a property name error:


Here is a code outline

procedure combobox.valid
if thisform.wlHTMLgen
return textmerge([someFunction('', this.value);])
endif

procedure commandButton.click
lparameter toValues
if thisform.wlHTMLgen
return textmerge([FoxInCloud.MethExec('', 'Click', window.comboValues);])
endif

if vartype(m.toValues) == 'O'
local aProp[1], iProp, cProp
for iProp = 1 to aMember(aProp, m.toValues)
cProp = m.aProp[m.iProp]
store evaluate('m.toValues.' + m.cProp) to ('thisForm.' + strtran(m.cProp, '_', '.'))
endfor
endif

... process values ....

function someFunction(comboID, comboValue){
if (!window.comboValues) window.comboValues = {};
window.comboValues[comboID] = comboValue;
}


Sorry, that was the problem.

Is there a way i can set .Value properties in the DOM and have FiC only read them at a later point:

IOW, I have a form with 30 comboboxes and one button. When the user selects various values in the comboboxes, it makes other comboxes on the form become visible or not visible. Rather than keep making trips to the server, I added some JS code to do that easily.

Then when the button .Click fires, VFP reads all the combobox values and performs certain actions.

Setting the DOM control.value only helps me so far if I also make a call to PropChange - but then I am still making calls to the server.

My backup plan is to have the button .Click execute JS code before the VFP code that polls all the combobox values.


Make sure to pass a reference to the HTML event object:

FoxInCloud.PropChange(event, tControl.id, 'value', tControl.value);


I frequently in my xxx.js use something like this:

FoxInCloud.PropChange(null, tControl.id, 'value', tControl.value);

But now that produces an error that FoxInCloud does not support my browser:





Gravatar is a globally recognized avatar based on your email address. Re: FoxInCloud.propchange issue
  FoxInCloud Support - Thierry N.
  Tuvia Vinitsky
  Nov 22, 2015 @ 12:18am
this is because of the '-' in .wcID -- can't be part of a VFP name, eg a property name

make sure that all controls cooperating in this venture (namely comboboxes and commandButton) are siblings, use .Name instead of .wcID as identifier, and this.Parent instead of thisForm


When I fire the commandbutton.Click, I get a property name error:


Here is a code outline

procedure combobox.valid
if thisform.wlHTMLgen
return textmerge([someFunction('', this.value);])
endif

procedure commandButton.click
lparameter toValues
if thisform.wlHTMLgen
return textmerge([FoxInCloud.MethExec('', 'Click', window.comboValues);])
endif

if vartype(m.toValues) == 'O'
local aProp[1], iProp, cProp
for iProp = 1 to aMember(aProp, m.toValues)
cProp = m.aProp[m.iProp]
store evaluate('m.toValues.' + m.cProp) to ('thisForm.' + strtran(m.cProp, '_', '.'))
endfor
endif

... process values ....

function someFunction(comboID, comboValue){
if (!window.comboValues) window.comboValues = {};
window.comboValues[comboID] = comboValue;
}


Sorry, that was the problem.

Is there a way i can set .Value properties in the DOM and have FiC only read them at a later point:

IOW, I have a form with 30 comboboxes and one button. When the user selects various values in the comboboxes, it makes other comboxes on the form become visible or not visible. Rather than keep making trips to the server, I added some JS code to do that easily.

Then when the button .Click fires, VFP reads all the combobox values and performs certain actions.

Setting the DOM control.value only helps me so far if I also make a call to PropChange - but then I am still making calls to the server.

My backup plan is to have the button .Click execute JS code before the VFP code that polls all the combobox values.


Make sure to pass a reference to the HTML event object:

FoxInCloud.PropChange(event, tControl.id, 'value', tControl.value);


I frequently in my xxx.js use something like this:

FoxInCloud.PropChange(null, tControl.id, 'value', tControl.value);

But now that produces an error that FoxInCloud does not support my browser:





Gravatar is a globally recognized avatar based on your email address. Re: FoxInCloud.propchange issue
  Tuvia Vinitsky
  Thierry Nivelet (FoxInCloud)
  Nov 22, 2015 @ 08:45am
Makes sense, did not think of the "-" issue. Will try as you suggest.


this is because of the '-' in .wcID -- can't be part of a VFP name, eg a property name

make sure that all controls cooperating in this venture (namely comboboxes and commandButton) are siblings, use .Name instead of .wcID as identifier, and this.Parent instead of thisForm


When I fire the commandbutton.Click, I get a property name error:


Here is a code outline

procedure combobox.valid
if thisform.wlHTMLgen
return textmerge([someFunction('', this.value);])
endif

procedure commandButton.click
lparameter toValues
if thisform.wlHTMLgen
return textmerge([FoxInCloud.MethExec('', 'Click', window.comboValues);])
endif

if vartype(m.toValues) == 'O'
local aProp[1], iProp, cProp
for iProp = 1 to aMember(aProp, m.toValues)
cProp = m.aProp[m.iProp]
store evaluate('m.toValues.' + m.cProp) to ('thisForm.' + strtran(m.cProp, '_', '.'))
endfor
endif

... process values ....

function someFunction(comboID, comboValue){
if (!window.comboValues) window.comboValues = {};
window.comboValues[comboID] = comboValue;
}


Sorry, that was the problem.

Is there a way i can set .Value properties in the DOM and have FiC only read them at a later point:

IOW, I have a form with 30 comboboxes and one button. When the user selects various values in the comboboxes, it makes other comboxes on the form become visible or not visible. Rather than keep making trips to the server, I added some JS code to do that easily.

Then when the button .Click fires, VFP reads all the combobox values and performs certain actions.

Setting the DOM control.value only helps me so far if I also make a call to PropChange - but then I am still making calls to the server.

My backup plan is to have the button .Click execute JS code before the VFP code that polls all the combobox values.


Make sure to pass a reference to the HTML event object:

FoxInCloud.PropChange(event, tControl.id, 'value', tControl.value);


I frequently in my xxx.js use something like this:

FoxInCloud.PropChange(null, tControl.id, 'value', tControl.value);

But now that produces an error that FoxInCloud does not support my browser:






Gravatar is a globally recognized avatar based on your email address. Re: FoxInCloud.propchange issue
  Tuvia Vinitsky
  Tuvia Vinitsky
  Nov 22, 2015 @ 12:31pm
I am not clear on "use .Name instead of .wcID as identifier". I am not specifying .wcID in the call.


Makes sense, did not think of the "-" issue. Will try as you suggest.


this is because of the '-' in .wcID -- can't be part of a VFP name, eg a property name

make sure that all controls cooperating in this venture (namely comboboxes and commandButton) are siblings, use .Name instead of .wcID as identifier, and this.Parent instead of thisForm


When I fire the commandbutton.Click, I get a property name error:


Here is a code outline

procedure combobox.valid
if thisform.wlHTMLgen
return textmerge([someFunction('', this.value);])
endif

procedure commandButton.click
lparameter toValues
if thisform.wlHTMLgen
return textmerge([FoxInCloud.MethExec('', 'Click', window.comboValues);])
endif

if vartype(m.toValues) == 'O'
local aProp[1], iProp, cProp
for iProp = 1 to aMember(aProp, m.toValues)
cProp = m.aProp[m.iProp]
store evaluate('m.toValues.' + m.cProp) to ('thisForm.' + strtran(m.cProp, '_', '.'))
endfor
endif

... process values ....

function someFunction(comboID, comboValue){
if (!window.comboValues) window.comboValues = {};
window.comboValues[comboID] = comboValue;
}


Sorry, that was the problem.

Is there a way i can set .Value properties in the DOM and have FiC only read them at a later point:

IOW, I have a form with 30 comboboxes and one button. When the user selects various values in the comboboxes, it makes other comboxes on the form become visible or not visible. Rather than keep making trips to the server, I added some JS code to do that easily.

Then when the button .Click fires, VFP reads all the combobox values and performs certain actions.

Setting the DOM control.value only helps me so far if I also make a call to PropChange - but then I am still making calls to the server.

My backup plan is to have the button .Click execute JS code before the VFP code that polls all the combobox values.


Make sure to pass a reference to the HTML event object:

FoxInCloud.PropChange(event, tControl.id, 'value', tControl.value);


I frequently in my xxx.js use something like this:

FoxInCloud.PropChange(null, tControl.id, 'value', tControl.value);

But now that produces an error that FoxInCloud does not support my browser:







Gravatar is a globally recognized avatar based on your email address. Re: FoxInCloud.propchange issue
  FoxInCloud Support - Thierry N.
  Tuvia Vinitsky
  Nov 22, 2015 @ 11:51pm
see http://foxincloud.com/tutotest/fileDisplay.tuto?ficSample.vcx.src

return Textmerge([comboValueCollect('', this.value);]) && see tuto.js
instead of
return Textmerge([comboValueCollect('', this.value);]) && see tuto.js

using this.Name solves the dash issue, and requires that comboboxes and the commandButton are siblings (have the same parent)

**************************************************
*-- Class: ficcbojsvalue (c:\program files\vfp9\tools\ab\aw\samples\fic\classe\ficsample.vcx)
*-- ParentClass: ficcbo (c:\program files\vfp9\tools\ab\aw\samples\fic\classe\ficsample.vcx)
*-- BaseClass: combobox
*-- Time Stamp: 11/19/15 11:41:10 AM

DEFINE CLASS ficcbojsvalue AS ficcbo

FontName = "Consolas"
Style = 2
Name = "ficcbojsvalue"

PROCEDURE InteractiveChange
return .F.
ENDPROC

PROCEDURE Valid
lparameters uselessParm && doc in Parent Code

if (Type('m.thisForm.wlHTMLgen') == 'L' AND m.thisForm.wlHTMLgen) && Added by FoxInCloud base classes Manager (source mode) on 02/11/15 17:53:33
return Textmerge([comboValueCollect('<<m.this.Name>>', this.value);]) && see tuto.js
endif
ENDPROC

ENDDEFINE
*-- EndDefine: ficcbojsvalue


I am not clear on "use .Name instead of .wcID as identifier". I am not specifying .wcID in the call.


Makes sense, did not think of the "-" issue. Will try as you suggest.


this is because of the '-' in .wcID -- can't be part of a VFP name, eg a property name

make sure that all controls cooperating in this venture (namely comboboxes and commandButton) are siblings, use .Name instead of .wcID as identifier, and this.Parent instead of thisForm


When I fire the commandbutton.Click, I get a property name error:


Here is a code outline

procedure combobox.valid
if thisform.wlHTMLgen
return textmerge([someFunction('', this.value);])
endif

procedure commandButton.click
lparameter toValues
if thisform.wlHTMLgen
return textmerge([FoxInCloud.MethExec('', 'Click', window.comboValues);])
endif

if vartype(m.toValues) == 'O'
local aProp[1], iProp, cProp
for iProp = 1 to aMember(aProp, m.toValues)
cProp = m.aProp[m.iProp]
store evaluate('m.toValues.' + m.cProp) to ('thisForm.' + strtran(m.cProp, '_', '.'))
endfor
endif

... process values ....

function someFunction(comboID, comboValue){
if (!window.comboValues) window.comboValues = {};
window.comboValues[comboID] = comboValue;
}


Sorry, that was the problem.

Is there a way i can set .Value properties in the DOM and have FiC only read them at a later point:

IOW, I have a form with 30 comboboxes and one button. When the user selects various values in the comboboxes, it makes other comboxes on the form become visible or not visible. Rather than keep making trips to the server, I added some JS code to do that easily.

Then when the button .Click fires, VFP reads all the combobox values and performs certain actions.

Setting the DOM control.value only helps me so far if I also make a call to PropChange - but then I am still making calls to the server.

My backup plan is to have the button .Click execute JS code before the VFP code that polls all the combobox values.


Make sure to pass a reference to the HTML event object:

FoxInCloud.PropChange(event, tControl.id, 'value', tControl.value);


I frequently in my xxx.js use something like this:

FoxInCloud.PropChange(null, tControl.id, 'value', tControl.value);

But now that produces an error that FoxInCloud does not support my browser:









-- thn (FoxInCloud)

Gravatar is a globally recognized avatar based on your email address. Re: FoxInCloud.propchange issue
  Tuvia Vinitsky
  Thierry Nivelet (FoxInCloud)
  Nov 23, 2015 @ 10:54pm
That's what I had, only I was explicitly including the name rather than a textmerge, which now I changed, but it still looks for the property with the dash.

I have not yet redone the forms to make the comboboxes and the commandbutton siblings, I was trying to get past the dash in the property. If I make them siblings -- right now they are nowhere near sibings and making them so will be some work -- is that going to affect the dash in the property name problem?


see http://foxincloud.com/tutotest/fileDisplay.tuto?ficSample.vcx.src

return Textmerge([comboValueCollect('', this.value);]) && see tuto.js
instead of
return Textmerge([comboValueCollect('', this.value);]) && see tuto.js

using this.Name solves the dash issue, and requires that comboboxes and the commandButton are siblings (have the same parent)

**************************************************
*-- Class: ficcbojsvalue (c:\program files\vfp9\tools\ab\aw\samples\fic\classe\ficsample.vcx)
*-- ParentClass: ficcbo (c:\program files\vfp9\tools\ab\aw\samples\fic\classe\ficsample.vcx)
*-- BaseClass: combobox
*-- Time Stamp: 11/19/15 11:41:10 AM

DEFINE CLASS ficcbojsvalue AS ficcbo

FontName = "Consolas"
Style = 2
Name = "ficcbojsvalue"

PROCEDURE InteractiveChange
return .F.
ENDPROC

PROCEDURE Valid
lparameters uselessParm && doc in Parent Code

if (Type('m.thisForm.wlHTMLgen') == 'L' AND m.thisForm.wlHTMLgen) && Added by FoxInCloud base classes Manager (source mode) on 02/11/15 17:53:33
return Textmerge([comboValueCollect('', this.value);]) && see tuto.js
endif
ENDPROC

ENDDEFINE
*-- EndDefine: ficcbojsvalue


I am not clear on "use .Name instead of .wcID as identifier". I am not specifying .wcID in the call.


Makes sense, did not think of the "-" issue. Will try as you suggest.


this is because of the '-' in .wcID -- can't be part of a VFP name, eg a property name

make sure that all controls cooperating in this venture (namely comboboxes and commandButton) are siblings, use .Name instead of .wcID as identifier, and this.Parent instead of thisForm


When I fire the commandbutton.Click, I get a property name error:


Here is a code outline

procedure combobox.valid
if thisform.wlHTMLgen
return textmerge([someFunction('', this.value);])
endif

procedure commandButton.click
lparameter toValues
if thisform.wlHTMLgen
return textmerge([FoxInCloud.MethExec('', 'Click', window.comboValues);])
endif

if vartype(m.toValues) == 'O'
local aProp[1], iProp, cProp
for iProp = 1 to aMember(aProp, m.toValues)
cProp = m.aProp[m.iProp]
store evaluate('m.toValues.' + m.cProp) to ('thisForm.' + strtran(m.cProp, '_', '.'))
endfor
endif

... process values ....

function someFunction(comboID, comboValue){
if (!window.comboValues) window.comboValues = {};
window.comboValues[comboID] = comboValue;
}


Sorry, that was the problem.

Is there a way i can set .Value properties in the DOM and have FiC only read them at a later point:

IOW, I have a form with 30 comboboxes and one button. When the user selects various values in the comboboxes, it makes other comboxes on the form become visible or not visible. Rather than keep making trips to the server, I added some JS code to do that easily.

Then when the button .Click fires, VFP reads all the combobox values and performs certain actions.

Setting the DOM control.value only helps me so far if I also make a call to PropChange - but then I am still making calls to the server.

My backup plan is to have the button .Click execute JS code before the VFP code that polls all the combobox values.


Make sure to pass a reference to the HTML event object:

FoxInCloud.PropChange(event, tControl.id, 'value', tControl.value);


I frequently in my xxx.js use something like this:

FoxInCloud.PropChange(null, tControl.id, 'value', tControl.value);

But now that produces an error that FoxInCloud does not support my browser:









Gravatar is a globally recognized avatar based on your email address. Re: FoxInCloud.propchange issue
  FoxInCloud Support - Thierry N.
  Tuvia Vinitsky
  Nov 24, 2015 @ 01:16am
this.wcID is the HTML ID attribute, calculated by chrtran(sys(1272, this), '.', '-') (we use '-' because IE used to not support '.' in HTML IDs)
As this.wcID contains '-' by design, you can either :

- if comboboxes are siblings, use .Name instead - (.Name) is always valid as a property name -- if combos and cmd are not siblings, use the combos' parent in form:

combo = Evaluate('thisForm.combosParent.' + m.comboName)

- else you can use your own naming convention such as strtran(this.wcID, '-', '0000'), and convert it back to a full address in cmd.Click():

address = strtran(m.address, '0000', '.')
combo = Evaluate('thisForm' + Substr(m.address, Atc('.', m.address))) && replaces form's name by thisForm


That's what I had, only I was explicitly including the name rather than a textmerge, which now I changed, but it still looks for the property with the dash.

I have not yet redone the forms to make the comboboxes and the commandbutton siblings, I was trying to get past the dash in the property. If I make them siblings -- right now they are nowhere near sibings and making them so will be some work -- is that going to affect the dash in the property name problem?


see http://foxincloud.com/tutotest/fileDisplay.tuto?ficSample.vcx.src

return Textmerge([comboValueCollect('', this.value);]) && see tuto.js
instead of
return Textmerge([comboValueCollect('', this.value);]) && see tuto.js

using this.Name solves the dash issue, and requires that comboboxes and the commandButton are siblings (have the same parent)

**************************************************
*-- Class: ficcbojsvalue (c:\program files\vfp9\tools\ab\aw\samples\fic\classe\ficsample.vcx)
*-- ParentClass: ficcbo (c:\program files\vfp9\tools\ab\aw\samples\fic\classe\ficsample.vcx)
*-- BaseClass: combobox
*-- Time Stamp: 11/19/15 11:41:10 AM

DEFINE CLASS ficcbojsvalue AS ficcbo

FontName = "Consolas"
Style = 2
Name = "ficcbojsvalue"

PROCEDURE InteractiveChange
return .F.
ENDPROC

PROCEDURE Valid
lparameters uselessParm && doc in Parent Code

if (Type('m.thisForm.wlHTMLgen') == 'L' AND m.thisForm.wlHTMLgen) && Added by FoxInCloud base classes Manager (source mode) on 02/11/15 17:53:33
return Textmerge([comboValueCollect('', this.value);]) && see tuto.js
endif
ENDPROC

ENDDEFINE
*-- EndDefine: ficcbojsvalue


I am not clear on "use .Name instead of .wcID as identifier". I am not specifying .wcID in the call.


Makes sense, did not think of the "-" issue. Will try as you suggest.


this is because of the '-' in .wcID -- can't be part of a VFP name, eg a property name

make sure that all controls cooperating in this venture (namely comboboxes and commandButton) are siblings, use .Name instead of .wcID as identifier, and this.Parent instead of thisForm


When I fire the commandbutton.Click, I get a property name error:


Here is a code outline

procedure combobox.valid
if thisform.wlHTMLgen
return textmerge([someFunction('', this.value);])
endif

procedure commandButton.click
lparameter toValues
if thisform.wlHTMLgen
return textmerge([FoxInCloud.MethExec('', 'Click', window.comboValues);])
endif

if vartype(m.toValues) == 'O'
local aProp[1], iProp, cProp
for iProp = 1 to aMember(aProp, m.toValues)
cProp = m.aProp[m.iProp]
store evaluate('m.toValues.' + m.cProp) to ('thisForm.' + strtran(m.cProp, '_', '.'))
endfor
endif

... process values ....

function someFunction(comboID, comboValue){
if (!window.comboValues) window.comboValues = {};
window.comboValues[comboID] = comboValue;
}


Sorry, that was the problem.

Is there a way i can set .Value properties in the DOM and have FiC only read them at a later point:

IOW, I have a form with 30 comboboxes and one button. When the user selects various values in the comboboxes, it makes other comboxes on the form become visible or not visible. Rather than keep making trips to the server, I added some JS code to do that easily.

Then when the button .Click fires, VFP reads all the combobox values and performs certain actions.

Setting the DOM control.value only helps me so far if I also make a call to PropChange - but then I am still making calls to the server.

My backup plan is to have the button .Click execute JS code before the VFP code that polls all the combobox values.


Make sure to pass a reference to the HTML event object:

FoxInCloud.PropChange(event, tControl.id, 'value', tControl.value);


I frequently in my xxx.js use something like this:

FoxInCloud.PropChange(null, tControl.id, 'value', tControl.value);

But now that produces an error that FoxInCloud does not support my browser:











-- thn (FoxInCloud)

Gravatar is a globally recognized avatar based on your email address. Re: FoxInCloud.propchange issue
  Tuvia Vinitsky
  Thierry Nivelet (FoxInCloud)
  Dec 6, 2015 @ 04:46am
I have this working well using my own naming conventions. However there is a problem in FF. Once I change the value in the dropdown and access it, at some later point I wish to reset it and start again. But any attempt to change the value in FF via JS simply fails. The value will not change to an empty string, it will only change to one of the select options. IOW it cannot be reset back to blank. IE has no problem.

I have tried every possible JS, jquery, and prototype command. Once I received a JS warning "jquery: permission denied to access object". Googling this error, it seems to be a known thing, but I was unclear on it.


this.wcID is the HTML ID attribute, calculated by chrtran(sys(1272, this), '.', '-') (we use '-' because IE used to not support '.' in HTML IDs)
As this.wcID contains '-' by design, you can either :

- if comboboxes are siblings, use .Name instead - (.Name) is always valid as a property name -- if combos and cmd are not siblings, use the combos' parent in form:

combo = Evaluate('thisForm.combosParent.' + m.comboName)

- else you can use your own naming convention such as strtran(this.wcID, '-', '0000'), and convert it back to a full address in cmd.Click():

address = strtran(m.address, '0000', '.')
combo = Evaluate('thisForm' + Substr(m.address, Atc('.', m.address))) && replaces form's name by thisForm


That's what I had, only I was explicitly including the name rather than a textmerge, which now I changed, but it still looks for the property with the dash.

I have not yet redone the forms to make the comboboxes and the commandbutton siblings, I was trying to get past the dash in the property. If I make them siblings -- right now they are nowhere near sibings and making them so will be some work -- is that going to affect the dash in the property name problem?


see http://foxincloud.com/tutotest/fileDisplay.tuto?ficSample.vcx.src

return Textmerge([comboValueCollect('', this.value);]) && see tuto.js
instead of
return Textmerge([comboValueCollect('', this.value);]) && see tuto.js

using this.Name solves the dash issue, and requires that comboboxes and the commandButton are siblings (have the same parent)

**************************************************
*-- Class: ficcbojsvalue (c:\program files\vfp9\tools\ab\aw\samples\fic\classe\ficsample.vcx)
*-- ParentClass: ficcbo (c:\program files\vfp9\tools\ab\aw\samples\fic\classe\ficsample.vcx)
*-- BaseClass: combobox
*-- Time Stamp: 11/19/15 11:41:10 AM

DEFINE CLASS ficcbojsvalue AS ficcbo

FontName = "Consolas"
Style = 2
Name = "ficcbojsvalue"

PROCEDURE InteractiveChange
return .F.
ENDPROC

PROCEDURE Valid
lparameters uselessParm && doc in Parent Code

if (Type('m.thisForm.wlHTMLgen') == 'L' AND m.thisForm.wlHTMLgen) && Added by FoxInCloud base classes Manager (source mode) on 02/11/15 17:53:33
return Textmerge([comboValueCollect('', this.value);]) && see tuto.js
endif
ENDPROC

ENDDEFINE
*-- EndDefine: ficcbojsvalue


I am not clear on "use .Name instead of .wcID as identifier". I am not specifying .wcID in the call.


Makes sense, did not think of the "-" issue. Will try as you suggest.


this is because of the '-' in .wcID -- can't be part of a VFP name, eg a property name

make sure that all controls cooperating in this venture (namely comboboxes and commandButton) are siblings, use .Name instead of .wcID as identifier, and this.Parent instead of thisForm


When I fire the commandbutton.Click, I get a property name error:


Here is a code outline

procedure combobox.valid
if thisform.wlHTMLgen
return textmerge([someFunction('', this.value);])
endif

procedure commandButton.click
lparameter toValues
if thisform.wlHTMLgen
return textmerge([FoxInCloud.MethExec('', 'Click', window.comboValues);])
endif

if vartype(m.toValues) == 'O'
local aProp[1], iProp, cProp
for iProp = 1 to aMember(aProp, m.toValues)
cProp = m.aProp[m.iProp]
store evaluate('m.toValues.' + m.cProp) to ('thisForm.' + strtran(m.cProp, '_', '.'))
endfor
endif

... process values ....

function someFunction(comboID, comboValue){
if (!window.comboValues) window.comboValues = {};
window.comboValues[comboID] = comboValue;
}


Sorry, that was the problem.

Is there a way i can set .Value properties in the DOM and have FiC only read them at a later point:

IOW, I have a form with 30 comboboxes and one button. When the user selects various values in the comboboxes, it makes other comboxes on the form become visible or not visible. Rather than keep making trips to the server, I added some JS code to do that easily.

Then when the button .Click fires, VFP reads all the combobox values and performs certain actions.

Setting the DOM control.value only helps me so far if I also make a call to PropChange - but then I am still making calls to the server.

My backup plan is to have the button .Click execute JS code before the VFP code that polls all the combobox values.


Make sure to pass a reference to the HTML event object:

FoxInCloud.PropChange(event, tControl.id, 'value', tControl.value);


I frequently in my xxx.js use something like this:

FoxInCloud.PropChange(null, tControl.id, 'value', tControl.value);

But now that produces an error that FoxInCloud does not support my browser:











Gravatar is a globally recognized avatar based on your email address. Re: FoxInCloud.propchange issue
  Tuvia Vinitsky
  Tuvia Vinitsky
  Dec 6, 2015 @ 05:01am
Looks like I messed up finding my problem. It is true that IE will reset the object.value and display correctly, but FiC still thinks the old values are in place.

So
1. I change combobox values
2. those comboxes have a .Valid that uses JS to display a warning label. This results in no trip to the server.
3. When the user has populated the comboboxes, he presses a button.
4. That button uses the logic we discussed to pass to VFP the collection of combobox values.
5. The .Click receives the list of values and updates the VFP controls with those values, then continues processing with those values.
6. So far all is fine. Now I want to set the comboboxes back to empty values so the user can "start over"
7. I tried:
a. changing .value in VFP to be blank
b. changing .value in JS to be blank
8. The value change is not recognized at all by FF
9. IE displays the new blank value
10. Both FF and IE, FiC still sees the former value and not a blank value

BUT

I can change the value to some other choice in the select list. It is only blank that causes the problem -- yet initially the value was blank.
How can I get the value to be blank again?



I have this working well using my own naming conventions. However there is a problem in FF. Once I change the value in the dropdown and access it, at some later point I wish to reset it and start again. But any attempt to change the value in FF via JS simply fails. The value will not change to an empty string, it will only change to one of the select options. IOW it cannot be reset back to blank. IE has no problem.

I have tried every possible JS, jquery, and prototype command. Once I received a JS warning "jquery: permission denied to access object". Googling this error, it seems to be a known thing, but I was unclear on it.


this.wcID is the HTML ID attribute, calculated by chrtran(sys(1272, this), '.', '-') (we use '-' because IE used to not support '.' in HTML IDs)
As this.wcID contains '-' by design, you can either :

- if comboboxes are siblings, use .Name instead - (.Name) is always valid as a property name -- if combos and cmd are not siblings, use the combos' parent in form:

combo = Evaluate('thisForm.combosParent.' + m.comboName)

- else you can use your own naming convention such as strtran(this.wcID, '-', '0000'), and convert it back to a full address in cmd.Click():

address = strtran(m.address, '0000', '.')
combo = Evaluate('thisForm' + Substr(m.address, Atc('.', m.address))) && replaces form's name by thisForm


That's what I had, only I was explicitly including the name rather than a textmerge, which now I changed, but it still looks for the property with the dash.

I have not yet redone the forms to make the comboboxes and the commandbutton siblings, I was trying to get past the dash in the property. If I make them siblings -- right now they are nowhere near sibings and making them so will be some work -- is that going to affect the dash in the property name problem?


see http://foxincloud.com/tutotest/fileDisplay.tuto?ficSample.vcx.src

return Textmerge([comboValueCollect('', this.value);]) && see tuto.js
instead of
return Textmerge([comboValueCollect('', this.value);]) && see tuto.js

using this.Name solves the dash issue, and requires that comboboxes and the commandButton are siblings (have the same parent)

**************************************************
*-- Class: ficcbojsvalue (c:\program files\vfp9\tools\ab\aw\samples\fic\classe\ficsample.vcx)
*-- ParentClass: ficcbo (c:\program files\vfp9\tools\ab\aw\samples\fic\classe\ficsample.vcx)
*-- BaseClass: combobox
*-- Time Stamp: 11/19/15 11:41:10 AM

DEFINE CLASS ficcbojsvalue AS ficcbo

FontName = "Consolas"
Style = 2
Name = "ficcbojsvalue"

PROCEDURE InteractiveChange
return .F.
ENDPROC

PROCEDURE Valid
lparameters uselessParm && doc in Parent Code

if (Type('m.thisForm.wlHTMLgen') == 'L' AND m.thisForm.wlHTMLgen) && Added by FoxInCloud base classes Manager (source mode) on 02/11/15 17:53:33
return Textmerge([comboValueCollect('', this.value);]) && see tuto.js
endif
ENDPROC

ENDDEFINE
*-- EndDefine: ficcbojsvalue


I am not clear on "use .Name instead of .wcID as identifier". I am not specifying .wcID in the call.


Makes sense, did not think of the "-" issue. Will try as you suggest.


this is because of the '-' in .wcID -- can't be part of a VFP name, eg a property name

make sure that all controls cooperating in this venture (namely comboboxes and commandButton) are siblings, use .Name instead of .wcID as identifier, and this.Parent instead of thisForm


When I fire the commandbutton.Click, I get a property name error:


Here is a code outline

procedure combobox.valid
if thisform.wlHTMLgen
return textmerge([someFunction('', this.value);])
endif

procedure commandButton.click
lparameter toValues
if thisform.wlHTMLgen
return textmerge([FoxInCloud.MethExec('', 'Click', window.comboValues);])
endif

if vartype(m.toValues) == 'O'
local aProp[1], iProp, cProp
for iProp = 1 to aMember(aProp, m.toValues)
cProp = m.aProp[m.iProp]
store evaluate('m.toValues.' + m.cProp) to ('thisForm.' + strtran(m.cProp, '_', '.'))
endfor
endif

... process values ....

function someFunction(comboID, comboValue){
if (!window.comboValues) window.comboValues = {};
window.comboValues[comboID] = comboValue;
}


Sorry, that was the problem.

Is there a way i can set .Value properties in the DOM and have FiC only read them at a later point:

IOW, I have a form with 30 comboboxes and one button. When the user selects various values in the comboboxes, it makes other comboxes on the form become visible or not visible. Rather than keep making trips to the server, I added some JS code to do that easily.

Then when the button .Click fires, VFP reads all the combobox values and performs certain actions.

Setting the DOM control.value only helps me so far if I also make a call to PropChange - but then I am still making calls to the server.

My backup plan is to have the button .Click execute JS code before the VFP code that polls all the combobox values.


Make sure to pass a reference to the HTML event object:

FoxInCloud.PropChange(event, tControl.id, 'value', tControl.value);


I frequently in my xxx.js use something like this:

FoxInCloud.PropChange(null, tControl.id, 'value', tControl.value);

But now that produces an error that FoxInCloud does not support my browser:












Gravatar is a globally recognized avatar based on your email address. Re: FoxInCloud.propchange issue
  FoxInCloud Support - Thierry N.
  Tuvia Vinitsky
  Dec 7, 2015 @ 01:49am
answered in the wrong thread sorry
http://www.west-wind.com/wwThreads/ShowThreadMessages.wwt?ThreadId=4ID0BHE9Z


I have this working well using my own naming conventions. However there is a problem in FF. Once I change the value in the dropdown and access it, at some later point I wish to reset it and start again. But any attempt to change the value in FF via JS simply fails. The value will not change to an empty string, it will only change to one of the select options. IOW it cannot be reset back to blank. IE has no problem.

I have tried every possible JS, jquery, and prototype command. Once I received a JS warning "jquery: permission denied to access object". Googling this error, it seems to be a known thing, but I was unclear on it.


this.wcID is the HTML ID attribute, calculated by chrtran(sys(1272, this), '.', '-') (we use '-' because IE used to not support '.' in HTML IDs)
As this.wcID contains '-' by design, you can either :

- if comboboxes are siblings, use .Name instead - (.Name) is always valid as a property name -- if combos and cmd are not siblings, use the combos' parent in form:

combo = Evaluate('thisForm.combosParent.' + m.comboName)

- else you can use your own naming convention such as strtran(this.wcID, '-', '0000'), and convert it back to a full address in cmd.Click():

address = strtran(m.address, '0000', '.')
combo = Evaluate('thisForm' + Substr(m.address, Atc('.', m.address))) && replaces form's name by thisForm


That's what I had, only I was explicitly including the name rather than a textmerge, which now I changed, but it still looks for the property with the dash.

I have not yet redone the forms to make the comboboxes and the commandbutton siblings, I was trying to get past the dash in the property. If I make them siblings -- right now they are nowhere near sibings and making them so will be some work -- is that going to affect the dash in the property name problem?


see http://foxincloud.com/tutotest/fileDisplay.tuto?ficSample.vcx.src

return Textmerge([comboValueCollect('', this.value);]) && see tuto.js
instead of
return Textmerge([comboValueCollect('', this.value);]) && see tuto.js

using this.Name solves the dash issue, and requires that comboboxes and the commandButton are siblings (have the same parent)

**************************************************
*-- Class: ficcbojsvalue (c:\program files\vfp9\tools\ab\aw\samples\fic\classe\ficsample.vcx)
*-- ParentClass: ficcbo (c:\program files\vfp9\tools\ab\aw\samples\fic\classe\ficsample.vcx)
*-- BaseClass: combobox
*-- Time Stamp: 11/19/15 11:41:10 AM

DEFINE CLASS ficcbojsvalue AS ficcbo

FontName = "Consolas"
Style = 2
Name = "ficcbojsvalue"

PROCEDURE InteractiveChange
return .F.
ENDPROC

PROCEDURE Valid
lparameters uselessParm && doc in Parent Code

if (Type('m.thisForm.wlHTMLgen') == 'L' AND m.thisForm.wlHTMLgen) && Added by FoxInCloud base classes Manager (source mode) on 02/11/15 17:53:33
return Textmerge([comboValueCollect('', this.value);]) && see tuto.js
endif
ENDPROC

ENDDEFINE
*-- EndDefine: ficcbojsvalue


I am not clear on "use .Name instead of .wcID as identifier". I am not specifying .wcID in the call.


Makes sense, did not think of the "-" issue. Will try as you suggest.


this is because of the '-' in .wcID -- can't be part of a VFP name, eg a property name

make sure that all controls cooperating in this venture (namely comboboxes and commandButton) are siblings, use .Name instead of .wcID as identifier, and this.Parent instead of thisForm


When I fire the commandbutton.Click, I get a property name error:


Here is a code outline

procedure combobox.valid
if thisform.wlHTMLgen
return textmerge([someFunction('', this.value);])
endif

procedure commandButton.click
lparameter toValues
if thisform.wlHTMLgen
return textmerge([FoxInCloud.MethExec('', 'Click', window.comboValues);])
endif

if vartype(m.toValues) == 'O'
local aProp[1], iProp, cProp
for iProp = 1 to aMember(aProp, m.toValues)
cProp = m.aProp[m.iProp]
store evaluate('m.toValues.' + m.cProp) to ('thisForm.' + strtran(m.cProp, '_', '.'))
endfor
endif

... process values ....

function someFunction(comboID, comboValue){
if (!window.comboValues) window.comboValues = {};
window.comboValues[comboID] = comboValue;
}


Sorry, that was the problem.

Is there a way i can set .Value properties in the DOM and have FiC only read them at a later point:

IOW, I have a form with 30 comboboxes and one button. When the user selects various values in the comboboxes, it makes other comboxes on the form become visible or not visible. Rather than keep making trips to the server, I added some JS code to do that easily.

Then when the button .Click fires, VFP reads all the combobox values and performs certain actions.

Setting the DOM control.value only helps me so far if I also make a call to PropChange - but then I am still making calls to the server.

My backup plan is to have the button .Click execute JS code before the VFP code that polls all the combobox values.


Make sure to pass a reference to the HTML event object:

FoxInCloud.PropChange(event, tControl.id, 'value', tControl.value);


I frequently in my xxx.js use something like this:

FoxInCloud.PropChange(null, tControl.id, 'value', tControl.value);

But now that produces an error that FoxInCloud does not support my browser:













-- thn (FoxInCloud)

Gravatar is a globally recognized avatar based on your email address. Re: FoxInCloud.propchange issue
  Tuvia Vinitsky
  Thierry Nivelet (FoxInCloud)
  Dec 7, 2015 @ 05:15am
Saw answer there, excellent. I would not have figured out to use .selectedindex. Thanks again.


answered in the wrong thread sorry
http://www.west-wind.com/wwThreads/ShowThreadMessages.wwt?ThreadId=4ID0BHE9Z


I have this working well using my own naming conventions. However there is a problem in FF. Once I change the value in the dropdown and access it, at some later point I wish to reset it and start again. But any attempt to change the value in FF via JS simply fails. The value will not change to an empty string, it will only change to one of the select options. IOW it cannot be reset back to blank. IE has no problem.

I have tried every possible JS, jquery, and prototype command. Once I received a JS warning "jquery: permission denied to access object". Googling this error, it seems to be a known thing, but I was unclear on it.


this.wcID is the HTML ID attribute, calculated by chrtran(sys(1272, this), '.', '-') (we use '-' because IE used to not support '.' in HTML IDs)
As this.wcID contains '-' by design, you can either :

- if comboboxes are siblings, use .Name instead - (.Name) is always valid as a property name -- if combos and cmd are not siblings, use the combos' parent in form:

combo = Evaluate('thisForm.combosParent.' + m.comboName)

- else you can use your own naming convention such as strtran(this.wcID, '-', '0000'), and convert it back to a full address in cmd.Click():

address = strtran(m.address, '0000', '.')
combo = Evaluate('thisForm' + Substr(m.address, Atc('.', m.address))) && replaces form's name by thisForm


That's what I had, only I was explicitly including the name rather than a textmerge, which now I changed, but it still looks for the property with the dash.

I have not yet redone the forms to make the comboboxes and the commandbutton siblings, I was trying to get past the dash in the property. If I make them siblings -- right now they are nowhere near sibings and making them so will be some work -- is that going to affect the dash in the property name problem?


see http://foxincloud.com/tutotest/fileDisplay.tuto?ficSample.vcx.src

return Textmerge([comboValueCollect('', this.value);]) && see tuto.js
instead of
return Textmerge([comboValueCollect('', this.value);]) && see tuto.js

using this.Name solves the dash issue, and requires that comboboxes and the commandButton are siblings (have the same parent)

**************************************************
*-- Class: ficcbojsvalue (c:\program files\vfp9\tools\ab\aw\samples\fic\classe\ficsample.vcx)
*-- ParentClass: ficcbo (c:\program files\vfp9\tools\ab\aw\samples\fic\classe\ficsample.vcx)
*-- BaseClass: combobox
*-- Time Stamp: 11/19/15 11:41:10 AM

DEFINE CLASS ficcbojsvalue AS ficcbo

FontName = "Consolas"
Style = 2
Name = "ficcbojsvalue"

PROCEDURE InteractiveChange
return .F.
ENDPROC

PROCEDURE Valid
lparameters uselessParm && doc in Parent Code

if (Type('m.thisForm.wlHTMLgen') == 'L' AND m.thisForm.wlHTMLgen) && Added by FoxInCloud base classes Manager (source mode) on 02/11/15 17:53:33
return Textmerge([comboValueCollect('', this.value);]) && see tuto.js
endif
ENDPROC

ENDDEFINE
*-- EndDefine: ficcbojsvalue


I am not clear on "use .Name instead of .wcID as identifier". I am not specifying .wcID in the call.


Makes sense, did not think of the "-" issue. Will try as you suggest.


this is because of the '-' in .wcID -- can't be part of a VFP name, eg a property name

make sure that all controls cooperating in this venture (namely comboboxes and commandButton) are siblings, use .Name instead of .wcID as identifier, and this.Parent instead of thisForm


When I fire the commandbutton.Click, I get a property name error:


Here is a code outline

procedure combobox.valid
if thisform.wlHTMLgen
return textmerge([someFunction('', this.value);])
endif

procedure commandButton.click
lparameter toValues
if thisform.wlHTMLgen
return textmerge([FoxInCloud.MethExec('', 'Click', window.comboValues);])
endif

if vartype(m.toValues) == 'O'
local aProp[1], iProp, cProp
for iProp = 1 to aMember(aProp, m.toValues)
cProp = m.aProp[m.iProp]
store evaluate('m.toValues.' + m.cProp) to ('thisForm.' + strtran(m.cProp, '_', '.'))
endfor
endif

... process values ....

function someFunction(comboID, comboValue){
if (!window.comboValues) window.comboValues = {};
window.comboValues[comboID] = comboValue;
}


Sorry, that was the problem.

Is there a way i can set .Value properties in the DOM and have FiC only read them at a later point:

IOW, I have a form with 30 comboboxes and one button. When the user selects various values in the comboboxes, it makes other comboxes on the form become visible or not visible. Rather than keep making trips to the server, I added some JS code to do that easily.

Then when the button .Click fires, VFP reads all the combobox values and performs certain actions.

Setting the DOM control.value only helps me so far if I also make a call to PropChange - but then I am still making calls to the server.

My backup plan is to have the button .Click execute JS code before the VFP code that polls all the combobox values.


Make sure to pass a reference to the HTML event object:

FoxInCloud.PropChange(event, tControl.id, 'value', tControl.value);


I frequently in my xxx.js use something like this:

FoxInCloud.PropChange(null, tControl.id, 'value', tControl.value);

But now that produces an error that FoxInCloud does not support my browser:













© 1996-2024