I assume by the "loader" page you mean the main HTML page that gets put in
the output directory (ie Problem.py -> Problem.html)?

I did this and you can actually see jsMath making an initial run of trying
to process anything it finds on the page, but there shouldn't be anything
there at that point because the content gets loaded via RPC call that
should happen after. That said, when I tried JS("
jsMath.ProcessBeforeShowing()") it said that jsMath was undefined which is
weird because you can tell its running. The other thing is if this does
present itself as a solution is there anyway to automatically add that
script tag to the loader page rather than having to do it by hand?

Also, I couldn't find the picasaweb example anywhere? Did a search for
Photos.py in the examples directory and didn't get anything?

Thanks,

Matt

On Sun, Feb 26, 2012 at 2:58 PM, lkcl luke <[email protected]> wrote:

> ok there's another way.  in the "loader" page (the static HTML) you
> put a script tag referring to the math.js file.
>
> then, try this:
>
> JS("... whatever function does the job")
>
> the alternative method which will work in pyjd as well is to look at
> the picasaweb example, Photos.py, and to *inject* a script node (!)
> into the page (see doRESTQuery).
>
>  but obviously, you will not be doing a script element with a url, you
> will be doing a script element with innerText = "<!--
> whatever_function_does_the_job() -->"
>
>  and when it's appended to the doc().body it should result in that
> function being executed.
>
>  he said.
>
>  :)
>
>  l.
>

Reply via email to