On Tue, Feb 28, 2012 at 11:34 PM, Matt Kelly <[email protected]> wrote:
> Conveniently, that is exactly how jsMath.ProcessBeforeShowing() works you
> can pass it a div element in exactly the way that you suggested. This
> thought actually occurred to me shortly before you posted it, but I just got
> a chance to try it today.
>
> This is my snippet of code...
>
>                 JS("""
>                     var el = document.getElementById("problem0");
>                     jsMath.ProcessBeforeShowing(el);
>                 """)
>
> And this is what the div element looks like...
>
> <div class="math" style="white-space: normal;" id="problem0">Find
> $$\frac{d}{dx}  -6x^{2} + -3x + 1$$</div>
>
> And yet somehow...the document.getElementByID is returning null when I set a
> breakpoint there in firebug. I've also tried getElementsByTagName("div") and
> that too returned nothing. If you look it in the DOM it shoes that the
> ownerDocument is "ProblemPage.html" which is correct. It's parent is the

 "it is parent is the <td>"?  i don't understand the sentence.  surely
you mean "its parent"?

> <td> to which it actually belongs. I don't get it nothing really seems out
> of place and yet it can't seem to find it.
>
> If it helps at all this is the code that adds this div...
>
>                 problemText = Label(item)
>                 problemText.setID("problem"+str(index))
>                 problemText.setStyleName("math")
>                 self.panel.add(problemText)
>
> where self.panel is just a VerticalPanel and item is the text generated by a
> for loop.
>
> Unless I'm doing something simple wrong, this seems to hit at the root of
> the problem. I suspect when not passed a element jsMath is doing this exact
> same thing more or less.
>
> Any insight/further steps?


 you're going to have to provide full source code - there's no point
in playing "guess the problem" here.

 make up a complete example and place the entire source code online
somewhere (don't post it to the list, it's not fair to throw files at
650 people and it overloads my server as well).

 l.

Reply via email to