title: HTML onclick - How to Access a Function
body: <p>I need to access a function that is within another function from a html onclick in a seperate file, I think because it's in another function this is why It's coming back as undefined, I can access functions that arent nested within my index file but the one I need I cant. The function is within my socket function as it uses its ID.</p>
  
  <p>the function I am trying to access is in this format:</p>
  
  <pre><code>io.of('/main').on('connection', function (socket) {
  
      socket.on('chat message', function (msg) {
  
       function oneCall() {
  </code></pre>
  
  <p>It is this oneCall functon I am trying to access. When I call a function that is out of this socket scope it works okay but I need the function within the socket?</p>
  
  <p>Thanks.</p>