No I'll need to be able to call the function at any point because once the page is fully loaded I'll do RPC calls and then need jsMath to reprocess the page. I like Pascal's solution other than the unfortunately directory structure that its forcing me to have for the moment and the fact that it appears that jsMath doesn't have access to the actual contents of the page.
Trying what Luke suggested if you go into the HTML in the iframe's you can see that jsMath trying to display stuff (it usually displays a warning immediately) which you can see in the HTML but it doesn't actually display in the browser. Either way it seems like the pure js needs access to content created via pyjs. Is there anyway to do this? Matt On Sun, Feb 26, 2012 at 4:30 PM, Peter Bittner <[email protected]>wrote: > Matt, > > 2012/2/26 Matt Kelly <[email protected]>: > > 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 > > The problem is that the jsMath library executes immediately as soon as > it is included, is this correct? Or when you do the JS( ... ) call the > divs jsMath is supposed to process are not yet generated? So maybe if > you import the js.file when you are sure the document is ready? > > Just thinking aloud... Feel free to ignore > > > 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? > > I think you would simply write a def in python (pyjs) that appends a > script node to the document. Then you have your single-function-call > solution ready without "having to do it by hand", apart from writing, > say, "execJsMathFunc('... something ...')". > > What do you think? Doable? > Peter >

