469,602 Members | 1,729 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,602 developers. It's quick & easy.

Not showing up in Console Log?

Hello,

I am troubleshoot errors with my code, however, it is not showing up in the console log. Can you please take a look and let me know if anything stands out for why this may not be showing up in the log?

Thanks for your help!
Expand|Select|Wrap|Line Numbers
  1. <script>
  2. definitions = <?= json_encode ($def); ?>
  3.  
  4. function refreshDefinition( stat_id ) {
  5. var definition = definitions[ stat_id ];
  6. var div = $('<div id="definition"><span class="statdefinition">'+definition.name+': </span>'+definition.definition+'</div>');
  7. $('#definition').replaceWith( div );
  8. }
  9.  
  10. $('input[type=checkbox]').change( function(){
  11.   if ( ! $(this).is(':checked') )
  12.     return false;
  13.   var stat_id = $(this).attr( 'id' ).replace( /checkbox_/, '' );
  14.   refreshDefinition( stat_id );
  15. } );
  16. </script>
  17.  
Oct 26 '10 #1

✓ answered by BaseballGraphs

Hi,
Thanks so much for your response. I actually resolved the problem.

It appears as though I had previously encoded $def, so performing the following was double encoding it and therefore the results were undefined and no errors were returning in the console.
Expand|Select|Wrap|Line Numbers
  1. definitions = <?= json_encode ($def); ?>
  2.  
I was using Google Chrome obviously. The best browser in all the land...

2 2136
JKing
1,206 Expert 1GB
What browser are you using?

The only thing that really stands out to me is that you haven't set the type attribute in the script tag.
<script type="text/javascript">

It is possible that even if your script is not performing as you think it should that there are no errors.

If that is the case could you elaborate on the results you are trying to achieve and we can help you find a solution.
Oct 27 '10 #2
Hi,
Thanks so much for your response. I actually resolved the problem.

It appears as though I had previously encoded $def, so performing the following was double encoding it and therefore the results were undefined and no errors were returning in the console.
Expand|Select|Wrap|Line Numbers
  1. definitions = <?= json_encode ($def); ?>
  2.  
I was using Google Chrome obviously. The best browser in all the land...
Oct 27 '10 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by TheOne | last post: by
3 posts views Thread by Alex | last post: by
7 posts views Thread by Just Me | last post: by
3 posts views Thread by Andy | last post: by
3 posts views Thread by =?Utf-8?B?VGVycmFuY2U=?= | last post: by
reply views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.