I am having difficulty once again creating a code block .. this time inserting a parameter into a method
//Here is the method line that works 'hard coded'
//IE:Document:Forms:oc:Item(x):GetAttribute("type")
cSSBD := "Document:Forms:oc"
cNode_name := "type"
bSSBD := &( [ { | IE | IE:]+cSSBD+[:length]+[ } ] )
nCOUNT := eval( bSSBD, IE ) // 9
- Code: Select all Expand view
For x=0 to nCount
try
*cRICK := IE:Document:Forms:oc:Item(x):GetAttribute("type") // hard coded ok
* bRICK := &( [ { | IE | IE:]+cSSBD+[:Item(x):GetAttribute("TYPE")]+[ } ] ) // works
// both fail below
bRICK := &( [ { | IE | IE:]+cSSBD+[:Item(x):GetAttribute("]+cNode_name+[)"]+[ } ] )
bRICK := &( [ { | IE | IE:]+cSSBD+[:Item(x):GetAttribute(]+cNODE_NAME+[)]+[ } ] )
cRICK := eval( bRICK, IE )
catch
x++
loop
end try
msginfo( cRICK+str(x) )
if lower( cRICK ) = lower( cNODE_VALUE )
IE:Document:Forms:oc:Item(x):Click() // work on this
lFOUND := .T.
EXIT
Endif
Next
I am having difficulty inserting cNode_name ("type") as a parameter into the GetAttribute( ) .. I keep getting cNode_name as undefined ??
I am sure I am just struggling with the correct syntax .. I would appreciate your help once again ..
Regards
Rick Lipkin