Re: [PHP] How to call DLL in Javascript

2009-11-17 Thread Ashley Sheridan
On Tue, 2009-11-17 at 17:58 +0530, Peter wrote:

 Hi All,
 
 I want to call dll in javascript
 
 I tried the following script, but i got the error message 'ActiveXObject 
 is undefined'
 (Note : i have the feedback.dll in the same path only)
 
 
 HTML
 HEAD
 script type='text/javascript' language='javascript'
 function comEventOccured()
 {
 
 try{
 var myobject;
 myobject = new ActiveXObject(feedback.dll);
 }catch(e){
 alert(e.description);
 return false;
 }
 
 }
 /script/head
 body
 input  type=button value=Call the DLL  onClick=comEventOccured()
 /body
 /html
 
 
 
 Regards
 Peter.
 


I'm not even sure this is possible, and if it is, you know it would only
work on Internet Explorer yeah?

Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [PHP] How to call DLL in Javascript

2009-11-17 Thread Phpster
I don't think you can di this with client side js. It would have to  
run outside the security sandbox and that is a bug no-no.


If the dll is in the server, you could potentially call the server via  
Ajax to instantiate the dll and have it's output sent to the browser


Bastien

Sent from my iPod

On Nov 17, 2009, at 7:28 AM, Peter pet...@egrabber.com wrote:


Hi All,

I want to call dll in javascript

I tried the following script, but i got the error message  
'ActiveXObject is undefined'

(Note : i have the feedback.dll in the same path only)


HTML
HEAD
script type='text/javascript' language='javascript'
function comEventOccured()
{

  try{
  var myobject;
  myobject = new ActiveXObject(feedback.dll);
  }catch(e){
  alert(e.description);
  return false;
  }

}
/script/head
body
input  type=button value=Call the DLL  onClick=comEventOccured()
/body
/html



Regards
Peter.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php