Trouble with revBrowserGet htmltext

Bringing the internet highway into your project? Building FTP, HTTP, email, chat or other client solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Trouble with revBrowserGet htmltext

Post by Simon » Thu Jul 02, 2009 1:40 pm

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

shadowslash
Posts: 344
Joined: Tue Feb 24, 2009 6:14 pm
Contact:

Post by shadowslash » Thu Jul 02, 2009 6:05 pm

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
Parañaque, Philippines
Image
Image

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Post by Simon » Fri Jul 03, 2009 11:03 am

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

shadowslash
Posts: 344
Joined: Tue Feb 24, 2009 6:14 pm
Contact:

Post by shadowslash » Sat Jul 04, 2009 4:58 am

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
Parañaque, Philippines
Image
Image

Post Reply