Manupriya wrote:
> Actually there is no PHP error as such. But we get an error that java script
> method is not defined. So we think that we have either not correctly
> specified the url or we are not putting the jar file at the correct
> location.
> 
> Our question is how to call a js in jar from php file? 
> 
> Thanks,
> Manu
> 
> 
> Shawn McKenzie wrote:
>> Manupriya wrote:
>>> Hi,
>>>
>>> We are using PHP 5.0, Java Script and Apace HTTP Server.
>>>
>>> For Mozilla security reason, we have created a signed jar of all the js
>>> files being used in our application. We have put this jar in the js
>>> folder
>>> itself.
>>>
>>> We have successfully installed the certificate. Now from one of the php
>>> page, we are using the following code - 
>>>
>>> <script type="text/javascript"
>>> src="jar:http://localhost/clients/js/signedJar.jar!/editGrid.js";></script>
>>> var ClipboardText=getClipboard(); 
>>>
>>> getClipboard() method is in editGrid.js file. But I get an exception
>>> telling
>>> getClipboard() method is not defined. 
>>>
>>> Please help.I think I am missing out on something important.
>>>
>>> Thanks,
>>> Manu
>>>
>>>
>> O.K. so what is the PHP error?
>>
>> -- 
>> Thanks!
>> -Shawn
>> http://www.spidean.com
>>
>> -- 
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>>
> 
My point was that just because you generate it from PHP code, it has
nothing at all to do with PHP.  It has everything to do with js/HTML.

I would assume that you need the full URL or path to the js file, just
like if you didn't use the jar, like one of the following:

src="jar:http://localhost/clients/js/signedJar.jar!clients/js/editGrid.js";

or

src="jar:http://localhost/clients/js/signedJar.jar!/clients/js/editGrid.js";

or

src="jar:http://localhost/clients/js/signedJar.jar!http://localhost/clients/js/editGrid.js";


-- 
Thanks!
-Shawn
http://www.spidean.com

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

Reply via email to