Page 1 of 1

Trouble with revBrowserGet htmltext

Posted: Thu Jul 02, 2009 1:40 pm
by Simon
Hello,
I'm trying to use the revBrowserGet function to grab a webpage source:

Code: Select all

on browserDocumentComplete sBrowserId, pURLS
   put revBrowserGet(sBrowserId, "rect") into gRect
   put revBrowserGet(sBrowserId, "htmltext") into gHTML
end browserDocumentComplete
The first put works and I get the rect, the second put gives me nothing. I'm testing with a very simple webpage:

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Server Available</title>
</head>

<body>
The Server is up and running.
</body>
</html>
Anybody have a clue to what revBrowserGet needs?

Thanks,
Simon

Posted: Thu Jul 02, 2009 6:05 pm
by shadowslash
Hi Simon,

I made this quick revBrowser demo stack for you, all the scripts are in the stack itself. Use F1 to view the browser's current loaded URL and use F2 to save the source code to a text file in your system. The reason I made this is because your topic somehow lacks enough detail so maybe you can get something from this demo. BTW, this was made through RunRev 3.5. Another probable reason is that you're using a previous version of RunRev and that was a bug which was already fixed in 3.5.

To trigger the F1 and F2 scripts I used the functionKey message which is also in the stack script in case you're going to look for it.

Hope this helped you out in any way. Image

To download the stack, here's the link.
http://www.mediafire.com/file/1q5oyondmlz/forSimon.rev

Posted: Fri Jul 03, 2009 11:03 am
by Simon
Thanks shadowslash!
your stack did make me think of something else. Don't know why but the revBrowserGet htmltext does not work in downloadComplete. I put it in a separate handler and made a send call to it. works now.

Thanks,
Simon

Posted: Sat Jul 04, 2009 4:58 am
by shadowslash
Maybe it's a bug or something? I really don't know since I haven't dealt with the same scenario yet. Anyhow, glad to be of help. Image