Page 1 of 1

Find Command in revBrowser

Posted: Sun Aug 28, 2011 6:59 pm
by lohill
There does not appear to be a revBrowserFind command but I have a situation where I would like to use one or the equivalent of one. The find command works very well to find things in fields and also seems to work very well in DataGrids. On a card which is basically made up of a revBrowser instance the find command returns 'not found'. If I am just in Explorer and looking at the web site a 'Find' seems to work just fine. Is there a way to implement that 'Find' while I am in Live Code with a revBrowser instance as the place where I want to find something?

Any suggestions for workarounds will be appreciated.

Regards,
Larry

Re: Find Command in revBrowser

Posted: Sun Aug 28, 2011 10:27 pm
by Mark
Hi Larry,

Get the htmlText of the browser object, find all instances of a string, change the htmlText to mark all these intances yellow, and set the htmlText of the browser object to the modified htmlText.

Kind regards,

Mark

Re: Find Command in revBrowser

Posted: Mon Aug 29, 2011 12:23 am
by lohill
Mark,
Get the htmlText of the browser object, find all instances of a string, change the htmlText to mark all these intances yellow, and set the htmlText of the browser object to the modified htmlText.
Unfortunately I am dealing with a web page that differs from the norm. This is all I get with a 'put revBrowserGet(1,"htmlText")':

<HTML><HEAD></HEAD>
<BODY><IMG src="http://admin.petfinder.com/pfadmin/a4j/ ... ODY></HTML>

If I 'View/Source' while in Explorer I can see all sorts of stuff but I cant seem to get revBrowser to give me the htmlText. In other parts of my program the only way I have been able to deal with the data on this web page is to select it all and copy it to the clipboard. Then using clipboardData I have been able to parse out the things I need to work with. This is not too elegant but has worked. I don't think this method would work for a Find though.

Do you have any other suggestions?

Larry