Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • I need string in javascript not boolean Commented Nov 13, 2013 at 23:13
  • @sf.dev, updated the example per your comment but the implementation is identical in both cases. Commented Nov 14, 2013 at 0:42
  • @ Mark Pund variable is showing null in javascript Commented Nov 14, 2013 at 1:33
  • @MarkPond You apparently missed the part where they asked "not in the constructor." This entire answer, while awesomely detailed, doesn't appear to answer the question at all. Commented Nov 14, 2013 at 2:18
  • 1
    @sfdcfox I now see where the disconnect is - the original question makes no mention of whether the 'method', fn() in the example, is called by a page action like a button click as your example demonstrates. My examples presume that this is not the case. You are correct that there are a variety of ways to implement the solution. Additional clarification in the question of the page behavior and how the method is called would help. Commented Nov 14, 2013 at 15:39