Using JavaScript to render HTML; nothing appearing but values will alert
Posted
by Jack Roscoe
on Stack Overflow
See other posts from Stack Overflow
or by Jack Roscoe
Published on 2010-06-08T09:58:54Z
Indexed on
2010/06/08
10:02 UTC
Read the original article
Hit count: 220
Hi,
I'm taking some information from some variables I have already defined outside this function to create a html svg text box.
Here is the function which is causing me trouble:
RenderTextBox:function()
{ alert('this.x: ' + this.x); alert('this.y: ' + this.y); this.textBox = paper.text(this.x, this.y, this.htmlTextBox); }
The alerts works prefectly, and prompt me with the values expected. However, the final line which is supposed to create the text box puts them nowhere to be seen. Does anybody know why?
If I replace 'this.x, this.y..
' with numerical values in the final line of the function, the text box is placed correctly. It's only when I use the 'this.x' and 'this.y' that I have issues.
© Stack Overflow or respective owner