I have successfully run NPRuntime plugin on webpage by copying it to firefox plugin directory. I want to create a firefox extension using it, so I created small extension that displays a textbox and a button on status bar, button click calls a javascript function which takes value from textbox and passes as a argument to the function in NpRuntime plugin which is embeded in XUL.
But when I try to call the function I get Javascript exception as that variable is null.
try{
var myplugin=document.getElementById("myplugin");
myplugin.test(document.getElementById("txtUri").value);// calling function
}catch(e){
alert(e.message); //throws the error as myplugin is null
}
When I remove function call there is no error so embed tag getting recognized by javascript. I kept a plugin dll in firefox plugins directory. I also tried creating a plugins directory under extension root and keeping my dll in that but it did not succeed .
Please help me get going,
thanks