Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dynamic dropdown list in webbrowser control
Message
From
19/04/2004 10:06:47
Mike Sue-Ping
Cambridge, Ontario, Canada
 
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00896067
Message ID:
00896110
Views:
29
Gerald,

I think that what you're suggesting is what I'm doing. I'm not using scripts. I'm using a VFP scan loop to access the list object in the html page as follows:
scan
   with thisform.oBrowserControl.document.frames('Content').SomeList
      .options[lnCounter].Value=...
      .options[lnCounter].Text=...
   endwith
endscan
This is after I intercept the user's action to rebuild the list via BeforeNavigate2 method.

I did notice some improvement with the speed after I modified the VFP code above to something like this:
olist = thisform.oBrowserControl.document.frames('Content').SomeList
olist.options.length = RECCOUNT('somecursor')
lnCounter = 0

select somecursor
scan
   with olist.options[lnCounter]
      .Value=...
      .Text=...
   endwith

   lnCounter = lnCounter + 1
endscan
Seems like VFP was being crippled with such a long object hierarchy. Do you see anyway to improve the speed of this code?

Thanks again for the help.

Mike


>
>Another approach you can try if a script on the page is too slow, is to recreate the list in VFP.
>
>You can cancel the navigation in BeforeNavigate2 event and replace the list in the document directly.
>
>My 2 c
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform