opensubscriber
   Find in this group all groups
 
Unknown more information…

x : xul-talk@lists.sourceforge.net 27 October 2010 • 9:07PM -0400

[xul-interop] Trying to load a URL in Xul browser with javascript
by Tom Brito

REPLY TO AUTHOR
 
REPLY TO GROUP




Hi there!

I'm trying to use the function loadURI( uri, referrer, charset
)<https://developer.mozilla.org/en/XUL/Method/loadURI>,
but I have low knowledge about web, and I really don't know what does it
means with "referrer" and what charset should I use. I think most web sites
use UTF-16, right? And what should I pass to "referrer"?

I just want to load "google.com".

*My Xul file:*

<window sizemode="maximized" hidechrome="true" id="browserWindow"
title="Window"
    onload="window.opener.close();
document.getElementById('browserID').focus();"
    xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
    <browser id="browserID" type="content" src="http://www.google.com.br/"
flex="1" />
</window>

*My javascript:*

var element = document.getElementById('browserID');
dump('element = ' + element.nodeName + '\n');
element.loadURI("www.google.com", "", "UTF-16");

*The console output:*

Error: element.loadURI is not a function


*

Any hint how to load the page?


[]s

Wellington B. de Carvalho
*

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.