FoxInCloud.PropChange(null, tControl.id, 'value', tControl.value);
But now that produces an error that FoxInCloud does not support my browser:
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)
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:
procedure combobox.valid
if thisform.wlHTMLgen
return textmerge([someFunction('', this.value);] )
endifprocedure commandButton.click
lparameter toValues
if thisform.wlHTMLgen
return textmerge([FoxInCloud.MethExec('', 'Click', window.comboValues);] )
endifif 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:
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);] )
endifprocedure commandButton.click
lparameter toValues
if thisform.wlHTMLgen
return textmerge([FoxInCloud.MethExec('', 'Click', window.comboValues);] )
endifif 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:
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);] )
endifprocedure commandButton.click
lparameter toValues
if thisform.wlHTMLgen
return textmerge([FoxInCloud.MethExec('', 'Click', window.comboValues);] )
endifif 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:
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);] )
endifprocedure commandButton.click
lparameter toValues
if thisform.wlHTMLgen
return textmerge([FoxInCloud.MethExec('', 'Click', window.comboValues);] )
endifif 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:
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);] )
endifprocedure commandButton.click
lparameter toValues
if thisform.wlHTMLgen
return textmerge([FoxInCloud.MethExec('', 'Click', window.comboValues);] )
endifif 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)
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);] )
endifprocedure commandButton.click
lparameter toValues
if thisform.wlHTMLgen
return textmerge([FoxInCloud.MethExec('', 'Click', window.comboValues);] )
endifif 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:
Slipped out of my mind sorry -- will do probably today.
-- thn (FoxInCloud)
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);] )
endifprocedure commandButton.click
lparameter toValues
if thisform.wlHTMLgen
return textmerge([FoxInCloud.MethExec('', 'Click', window.comboValues);] )
endifif 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)
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);] )
endifprocedure commandButton.click
lparameter toValues
if thisform.wlHTMLgen
return textmerge([FoxInCloud.MethExec('', 'Click', window.comboValues);] )
endifif 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:
Here is a code outline
procedure combobox.valid
if thisform.wlHTMLgen
return textmerge([someFunction('', this.value);] )
endifprocedure commandButton.click
lparameter toValues
if thisform.wlHTMLgen
return textmerge([FoxInCloud.MethExec('', 'Click', window.comboValues);] )
endifif 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:
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
ENDIFlocal 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);] )
endifprocedure commandButton.click
lparameter toValues
if thisform.wlHTMLgen
return textmerge([FoxInCloud.MethExec('', 'Click', window.comboValues);] )
endifif 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:
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);] )
endifprocedure commandButton.click
lparameter toValues
if thisform.wlHTMLgen
return textmerge([FoxInCloud.MethExec('', 'Click', window.comboValues);] )
endifif 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:
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);] )
endifprocedure commandButton.click
lparameter toValues
if thisform.wlHTMLgen
return textmerge([FoxInCloud.MethExec('', 'Click', window.comboValues);] )
endifif 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:
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);] )
endifprocedure commandButton.click
lparameter toValues
if thisform.wlHTMLgen
return textmerge([FoxInCloud.MethExec('', 'Click', window.comboValues);] )
endifif 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:
return Textmerge([comboValueCollect(' using this.Name solves the dash issue, and requires that comboboxes and the commandButton are siblings (have the same parent) FontName = "Consolas" PROCEDURE InteractiveChange PROCEDURE Valid ENDDEFINE 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 procedure commandButton.click if vartype(m.toValues) == 'O' ... process values .... 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. But now that produces an error that FoxInCloud does not support my browser:
instead of
return Textmerge([comboValueCollect('
*-- 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
Style = 2
Name = "ficcbojsvalue"
return .F.
ENDPROC
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: 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
When I fire the commandbutton.Click, I get a property name error:
Here is a code outline
if thisform.wlHTMLgen
return textmerge([someFunction('
endif
lparameter toValues
if thisform.wlHTMLgen
return textmerge([FoxInCloud.MethExec('
endif
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
if (!window.comboValues) window.comboValues = {};
window.comboValues[comboID] = comboValue;
}
Sorry, that was the problem.
Make sure to pass a reference to the HTML event object:
I frequently in my xxx.js use something like this:
-- thn (FoxInCloud)
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(' using this.Name solves the dash issue, and requires that comboboxes and the commandButton are siblings (have the same parent) FontName = "Consolas" PROCEDURE InteractiveChange PROCEDURE Valid ENDDEFINE 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 procedure commandButton.click if vartype(m.toValues) == 'O' ... process values .... 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. But now that produces an error that FoxInCloud does not support my browser:
instead of
return Textmerge([comboValueCollect('
*-- 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
Style = 2
Name = "ficcbojsvalue"
return .F.
ENDPROC
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('
endif
ENDPROC
*-- 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
When I fire the commandbutton.Click, I get a property name error:
Here is a code outline
if thisform.wlHTMLgen
return textmerge([someFunction('
endif
lparameter toValues
if thisform.wlHTMLgen
return textmerge([FoxInCloud.MethExec('
endif
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
if (!window.comboValues) window.comboValues = {};
window.comboValues[comboID] = comboValue;
}
Sorry, that was the problem.
Make sure to pass a reference to the HTML event object:
I frequently in my xxx.js use something like this:
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(' using this.Name solves the dash issue, and requires that comboboxes and the commandButton are siblings (have the same parent) FontName = "Consolas" PROCEDURE InteractiveChange PROCEDURE Valid ENDDEFINE 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 procedure commandButton.click if vartype(m.toValues) == 'O' ... process values .... 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. But now that produces an error that FoxInCloud does not support my browser:
instead of
return Textmerge([comboValueCollect('
*-- 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
Style = 2
Name = "ficcbojsvalue"
return .F.
ENDPROC
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('
endif
ENDPROC
*-- 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
When I fire the commandbutton.Click, I get a property name error:
Here is a code outline
if thisform.wlHTMLgen
return textmerge([someFunction('
endif
lparameter toValues
if thisform.wlHTMLgen
return textmerge([FoxInCloud.MethExec('
endif
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
if (!window.comboValues) window.comboValues = {};
window.comboValues[comboID] = comboValue;
}
Sorry, that was the problem.
Make sure to pass a reference to the HTML event object:
I frequently in my xxx.js use something like this:
-- thn (FoxInCloud)
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(' using this.Name solves the dash issue, and requires that comboboxes and the commandButton are siblings (have the same parent) FontName = "Consolas" PROCEDURE InteractiveChange PROCEDURE Valid ENDDEFINE 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 procedure commandButton.click if vartype(m.toValues) == 'O' ... process values .... 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. But now that produces an error that FoxInCloud does not support my browser:
instead of
return Textmerge([comboValueCollect('
*-- 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
Style = 2
Name = "ficcbojsvalue"
return .F.
ENDPROC
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('
endif
ENDPROC
*-- 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
When I fire the commandbutton.Click, I get a property name error:
Here is a code outline
if thisform.wlHTMLgen
return textmerge([someFunction('
endif
lparameter toValues
if thisform.wlHTMLgen
return textmerge([FoxInCloud.MethExec('
endif
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
if (!window.comboValues) window.comboValues = {};
window.comboValues[comboID] = comboValue;
}
Sorry, that was the problem.
Make sure to pass a reference to the HTML event object:
I frequently in my xxx.js use something like this:
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(' using this.Name solves the dash issue, and requires that comboboxes and the commandButton are siblings (have the same parent) FontName = "Consolas" PROCEDURE InteractiveChange PROCEDURE Valid ENDDEFINE 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 procedure commandButton.click if vartype(m.toValues) == 'O' ... process values .... 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. But now that produces an error that FoxInCloud does not support my browser:
instead of
return Textmerge([comboValueCollect('
*-- 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
Style = 2
Name = "ficcbojsvalue"
return .F.
ENDPROC
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('
endif
ENDPROC
*-- 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
When I fire the commandbutton.Click, I get a property name error:
Here is a code outline
if thisform.wlHTMLgen
return textmerge([someFunction('
endif
lparameter toValues
if thisform.wlHTMLgen
return textmerge([FoxInCloud.MethExec('
endif
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
if (!window.comboValues) window.comboValues = {};
window.comboValues[comboID] = comboValue;
}
Sorry, that was the problem.
Make sure to pass a reference to the HTML event object:
I frequently in my xxx.js use something like this:
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(' using this.Name solves the dash issue, and requires that comboboxes and the commandButton are siblings (have the same parent) FontName = "Consolas" PROCEDURE InteractiveChange PROCEDURE Valid ENDDEFINE 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 procedure commandButton.click if vartype(m.toValues) == 'O' ... process values .... 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. But now that produces an error that FoxInCloud does not support my browser:
instead of
return Textmerge([comboValueCollect('
*-- 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
Style = 2
Name = "ficcbojsvalue"
return .F.
ENDPROC
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('
endif
ENDPROC
*-- 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
When I fire the commandbutton.Click, I get a property name error:
Here is a code outline
if thisform.wlHTMLgen
return textmerge([someFunction('
endif
lparameter toValues
if thisform.wlHTMLgen
return textmerge([FoxInCloud.MethExec('
endif
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
if (!window.comboValues) window.comboValues = {};
window.comboValues[comboID] = comboValue;
}
Sorry, that was the problem.
Make sure to pass a reference to the HTML event object:
I frequently in my xxx.js use something like this:
-- thn (FoxInCloud)
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(' using this.Name solves the dash issue, and requires that comboboxes and the commandButton are siblings (have the same parent) FontName = "Consolas" PROCEDURE InteractiveChange PROCEDURE Valid ENDDEFINE 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 procedure commandButton.click if vartype(m.toValues) == 'O' ... process values .... 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. But now that produces an error that FoxInCloud does not support my browser:
instead of
return Textmerge([comboValueCollect('
*-- 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
Style = 2
Name = "ficcbojsvalue"
return .F.
ENDPROC
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('
endif
ENDPROC
*-- 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
When I fire the commandbutton.Click, I get a property name error:
Here is a code outline
if thisform.wlHTMLgen
return textmerge([someFunction('
endif
lparameter toValues
if thisform.wlHTMLgen
return textmerge([FoxInCloud.MethExec('
endif
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
if (!window.comboValues) window.comboValues = {};
window.comboValues[comboID] = comboValue;
}
Sorry, that was the problem.
Make sure to pass a reference to the HTML event object:
I frequently in my xxx.js use something like this: