Execute JavaScript without event handler

  • Post author:
  • Post category:Uncategorized

I am kind of thick sometimes, so many of you may already know this. I have a big ColdFusion page that does a LOT of data processing. I wanted my page to fire a JavaScript event to signify when certain things are done. My problem is that I thought one had to call JavaScript functions from event handlers like onClick or onLoad. I poked around on Google and found a forum question with my answer. All you have to do is put<script type=”text/javascript”>JavaScript code</script> at the appropriate location in the page body, and the browser executes that script when it gets to it! :\ Well, now I know, and if I ever forget, and later I’m doing a Google search, hopefully I find this blog entry! đŸ™‚