Joe,

Thanks so much for your excellent examples and information.
As a result of your mention of using ftp:/// I tried both of the following
<base> tags and avoided the html409 warning in both cases, but ...

<base href="ftp:///~root/Users/brian/j64-701/addons/graphics/d3/"/>
<base href="ftp:///Users/brian/j64-701/addons/graphics/d3/"/>

as you predicted got another error when clicking on the browser button:

"[Error] XMLHttpRequest cannot load
ftp:///Users/brian/j64-701/addons/graphics/d3/25.
Cross origin requests are only supported for HTTP.
send ([native code], line 0)
jdoajax (25, line 383)
ev_showbox_click (25, line 1095)
eval code
eval ([native code], line 0)
jevdo (25, line 342)
jev (25, line 325)
onclick (25, line 1101)"

So it looks like the solution is to use your template suggestion:

"<script src="~addons/ide/jhs/js/d3/d3.v3.min.js"></script>"

But I am a little confused by how that works, that ~ especially. I thought
~ was unique to J's jpath arguments; is ` more widely used in paths, also?
For example is it a unix special symbol? Please explain that.

Thanks so much,


On Sun, Jan 12, 2014 at 6:12 AM, Joe Bogner <joebog...@gmail.com> wrote:

> Brian -
>
> The best way to load the file from a local path is to have jhs supply
> it to the browser. Otherwise the browser is trying to work in a mixed
> local and remote mode.I don't know if it's possible for a base tag or
> otherwise to convince it to load a local file using a file:/// link.
> For example, Chrome throws a security exception
>
> "Not allowed to load local resource:
> file:///C:/users/joe/downloads/j801/addons/graphics/d3/d3.v2.min.js "
>
> '<script src="',(jpath '~addons/graphics/d3/d3.v2.min.js'), '"></script>'
>
> This does seem to work:
>
> <script src="~addons/ide/jhs/js/d3/d3.v3.min.js"></script>
>
> If you'd like to move it out of addons, then you can use the ~root prefix
>
> <script src="~root/temp/d3.v3.min.js"></script>
>
> This would have jhs load it from c:\temp on my computer
>
> I updated the gist https://gist.github.com/joebo/591f52147dfe02efa061
> to show this
>
> Does this cover the range of possibilities you are looking for?
>
> Thanks
> Joe
>
>
>
> --
(B=)
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to