javascript inside an admin menu?
-
This isn’t meant to be a double post but my other post is broken for some reason.
The alert() on this admin page doesn’t work, can I not put javascript here?
<?php add_action('admin_menu', 'mt_add_pages'); function mt_add_pages() { add_menu_page(__('Test Toplevel','menu-test'), __('Test Toplevel','menu-test'), 'manage_options', 'mt-top-level-handle', 'mt_toplevel_page' ); } function mt_toplevel_page() { echo "<h2>" . __( 'Test Toplevel', 'menu-test' ) . "</h2>"; echo "<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js'></script> <script language='text/javascript'> alert('test'); </script> "; ?> <div id='test'>asdf</div> <?php } ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘javascript inside an admin menu?’ is closed to new replies.