Shobhit jain
10-08-2009, 09:39 AM
Hi everyone ,here is the code which worked while i opened it with html file in firefox,but when that javascript function is called by XUL button ,it doesnt work,please help..and suggest for the possible alternatesunction getActiveText(e) {
var text = (document.all) ? document.selection.createRange().text : document.getSelection();
return true;
}
document.onmouseup = getActiveText;
if (!document.all)document.captureEvents(Event.MOUSEUP);
function redirectPage()
{
function redirectPage()
{
window.location = "http://www.domain.com/map.pl?q=" +document.getSelection();
}
please help me to call this function with XUL toolbar button.
Thanks:)
var text = (document.all) ? document.selection.createRange().text : document.getSelection();
return true;
}
document.onmouseup = getActiveText;
if (!document.all)document.captureEvents(Event.MOUSEUP);
function redirectPage()
{
function redirectPage()
{
window.location = "http://www.domain.com/map.pl?q=" +document.getSelection();
}
please help me to call this function with XUL toolbar button.
Thanks:)