I tested with this code, and did get absolute URLs from request.getURL(). If my suggestion below doesn't help, can you tell us which device and OS version you're running on? Thanks.
–
NateJan 18 '13 at 23:17

1 Answer
1

When I run your code, it does return me absolute URLs, even when my web page contained relative links. That said, it wouldn't surprise me if sometimes, it doesn't. I haven't fully tested this code, but I would think you could try something like this.

Basically, you check to see if the URL is absolute, and if not, you assemble an absolute URL by using the parent BrowserField document URL:

Again, for me, I was getting absolute URLs, so I couldn't easily test the code in the branch where the URL is relative. So, it's possible that I'm dropping a "/" somewhere, or not handling file:/// URLs properly.