This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Pages: [1]
1
Web Server - Ask For Help / Re: Change color on a field on a form
« on: March 02, 2012, 09:47:09 AM »
Bruce -
Here is that routine cut from the generated source. I'm not sure if I have an embed point available. I have figured out that for now, I should be able to set it to Required (which will turn it RED) when it meets my condition but, not sure where/how to do this.
My condition is basically
if result[1:2] = 'N,'
!set color to RED
else
! set color to green
end
Thanks
Value::Result Routine
! Start of "Set Value"
! [Priority 5000]
! End of "Set Value"
p_web._DivHeader('GetTicketNumber2_' & p_web._nocolon('Result') & '_value','adiv')
! Start of "Set Value"
! [Priority 5000]
! End of "Set Value"
loc:extra = ''
! --- STRING --- Result
loc:AutoComplete = 'autocomplete="off"'
loc:readonly = 'readonly'
loc:fieldclass = 'FormEntry'
loc:fieldclass = clip(loc:fieldclass) & ' ' & 'formreadonly'
If lower(loc:invalid) = lower('Result')
loc:fieldclass = clip(loc:fieldclass) & ' ' & 'formerror'
End
loc:extra = clip(loc:extra) & ' size="' & clip(100) &'"'
loc:javascript = ''
loc:javascript = clip(loc:javascript) & ' onchange="'&p_web._nocolon('sv(''Result'',''getticketnumber2_result_value'',1,FieldValue(this,1))')&';'
loc:javascript = clip(loc:javascript) & 'nextFocus('&clip(loc:formname)&','''&p_web._nocolon('Result')&''',0);'
if loc:javascript <> '' then loc:javascript = clip(loc:javascript) & '"'.
packet = clip(packet) & p_web.CreateInput('text','Result',p_web.GetSessionValue('Result'),loc:fieldclass,loc:readonly,clip(loc:extra) & ' ' & clip(loc:autocomplete),'@s100',loc:javascript,100,) & '<13,10>'
do SendPacket
! Start of "After Value"
! [Priority 5000]
! End of "After Value"
p_web._DivFooter()
p_web._RegisterDivEx('GetTicketNumber2_' & p_web._nocolon('Result') & '_value')
Here is that routine cut from the generated source. I'm not sure if I have an embed point available. I have figured out that for now, I should be able to set it to Required (which will turn it RED) when it meets my condition but, not sure where/how to do this.
My condition is basically
if result[1:2] = 'N,'
!set color to RED
else
! set color to green
end
Thanks
Value::Result Routine
! Start of "Set Value"
! [Priority 5000]
! End of "Set Value"
p_web._DivHeader('GetTicketNumber2_' & p_web._nocolon('Result') & '_value','adiv')
! Start of "Set Value"
! [Priority 5000]
! End of "Set Value"
loc:extra = ''
! --- STRING --- Result
loc:AutoComplete = 'autocomplete="off"'
loc:readonly = 'readonly'
loc:fieldclass = 'FormEntry'
loc:fieldclass = clip(loc:fieldclass) & ' ' & 'formreadonly'
If lower(loc:invalid) = lower('Result')
loc:fieldclass = clip(loc:fieldclass) & ' ' & 'formerror'
End
loc:extra = clip(loc:extra) & ' size="' & clip(100) &'"'
loc:javascript = ''
loc:javascript = clip(loc:javascript) & ' onchange="'&p_web._nocolon('sv(''Result'',''getticketnumber2_result_value'',1,FieldValue(this,1))')&';'
loc:javascript = clip(loc:javascript) & 'nextFocus('&clip(loc:formname)&','''&p_web._nocolon('Result')&''',0);'
if loc:javascript <> '' then loc:javascript = clip(loc:javascript) & '"'.
packet = clip(packet) & p_web.CreateInput('text','Result',p_web.GetSessionValue('Result'),loc:fieldclass,loc:readonly,clip(loc:extra) & ' ' & clip(loc:autocomplete),'@s100',loc:javascript,100,) & '<13,10>'
do SendPacket
! Start of "After Value"
! [Priority 5000]
! End of "After Value"
p_web._DivFooter()
p_web._RegisterDivEx('GetTicketNumber2_' & p_web._nocolon('Result') & '_value')
2
Web Server - Ask For Help / Change color on a field on a form
« on: March 01, 2012, 04:46:38 PM »
I have a netwebform with an entry field and a readonly field. Upon completion of the entry field, I call a procedure which does many things and returns a value. I display this value in a readonly field o nthe same form. I would like to change the color of the readonly field based on data within the result from my other procedure. How do I go about this?
BTW, using Nettalk 4 Clarion 8
BTW, using Nettalk 4 Clarion 8
Pages: [1]