JavaScript String Limit?
<p>I have a question concerning my javascript code (Sorry my english is not that good). The code works, however, with only one data entry, the string in the HTML which results, gets cut off near the end (last few characters seems to be dropped, the length of the character drop is consistent). I'm wondering if I'm hitting a string limit or something similar. The problem data entry (which gets stored in the var gDef below) is 4110 characters long which doesn't seem like it should be a problem... Help?</p>

<p>The following is my code:</p>

<pre><code>gI = document.gForm.gLinks.options[document.gForm.gLinks.selectedIndex].value;

definition = "";        

gWord = (g[gI].getElementsByTagName("NAME")[0].childNodes[0].nodeValue);

gDef = (g[gI].getElementsByTagName("DEFINITION")[0].childNodes[0].nodeValue).replace(/\n/g,'&lt;br /&gt;').replace(/\[/g,'&lt;').replace(/\]/g,'&gt;');

definition += ("&lt;div class=\"word\"&gt;");
definition += ("&lt;h3&gt;"+gWord+"&lt;/h3&gt;");
definition += ("&lt;div class=\"definition\"&gt;"+gDef+"&lt;/div&gt;");
definition += ("&lt;/div&gt;");

document.getElementById("showGlossary").innerHTML = definition;
</code></pre>
