Tag Archives: XUL

How to change the current URL in an XUL file ?

I came across this strange problem .

When I used this line of code

var currentURL = urls[z(0,totalurls-1)]; ;
window.location.href = currentURL;

where z is a function that returns the function randomly.

The code is working perfectly fine and changes the URL of the current window itself…but the problem here is that we can switch websites only once as the object that invokes the random change of URL disappears with the first site itself.

The solution is a Custom Toolbar which will not go away even if the URL is changed….Something like STUMBLE UPON..

stumble

stumble

So , when this same code is used in an XUL file, another window is being created with the random URL, but I want the random URL change to happen in the same window.It is creating one more window at each click of the Stumble button.

Doubt in XUL

Doubt in XUL

XUL help needed

stumble try

stumble try

Is there any way to reduce the size of the png image or autoresize the same ?The Stumble Icon which u see is actually an image added to the toolbox item ….using CSS i.e. from the tutorial mentioned in this site