Note that there are some explanatory texts on larger screens.

plurals
  1. POstrange behaviour of static method
    text
    copied!<p>I load a js variable like this:</p> <pre><code>var message = '&lt;%= CAnunturi.CPLATA_RAMBURS_INFO %&gt;'; </code></pre> <p>where the static string CPLATA_RAMBURS_INFO i put like:</p> <pre><code>public static string CPLATA_RAMBURS_INFO = "test"; </code></pre> <p>I use it very well in this method.</p> <pre><code> &lt;script type="text/javascript"&gt; var categoryParam = '&lt;%= CQueryStringParameters.CATEGORY %&gt;'; var subcategoryParam = '&lt;%= CQueryStringParameters.SUBCATEGORY1_ID %&gt;'; var message = '&lt;%= CAnunturi.CPLATA_RAMBURS_INFO %&gt;'; function timedInfo(header) { $.jGrowl(message, { header: header }); }; &lt;/script&gt; </code></pre> <p>so the message appears.</p> <p>I do not undersand, why, iso of "test", if i take the value from a static method, ths use of message js var is no longer succesfull (the message no longer appears).</p> <pre><code>public static string CPLATA_RAMBURS_INFO = getRambursInfo(); public static string getRambursInfo() { return System.IO.File.ReadAllText(PathsUtil.getRambursPlataFilePath()); } </code></pre> <p>EDIT: Source Code:</p> <pre><code>&lt;script type="text/javascript"&gt; var categoryParam = 'category'; var subcategoryParam = 'subcategory1Id'; var message = 'Lorem ipsum dolor sit amet, eu curabitur venenatis </code></pre> <p>viverra pellentesque tortor tempor, nam est suspendisse, aenean vestibulum, suspendisse eget metus aenean at dictum nulla. In luctus, neque porttitor suscipit nibh, aenean ut, commodo velit leo volutpat ullamcorper. ';</p> <pre><code> function timedInfo(header) { $.jGrowl(message, { header: header }); }; &lt;/script&gt; </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload