Title: Trouble with calling java and css
Last modified: August 20, 2016

---

# Trouble with calling java and css

 *  [jealous](https://wordpress.org/support/users/jealous/)
 * (@jealous)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/trouble-with-calling-java-and-css-1/)
 * Hello i am trying to call java into a settings tab i have created but i dont 
   seem to be having any luck with it can anyone help me please
 * i have added add_action like this
 *     ```
       add_action( 'load-toplevel_page_Booking_System', array( &$this, 'wps_calendar_func' ) );
       add_action( 'load-toplevel_page_Booking_System', array( &$this, 'form_admin_css' ) );
       ```
   
 * also the function thats is suppose to call the java script
 *     ```
       function wps_calendar_func(){
       wp_enqueue_script( 'SpryTabbedPanels');
   
       wp_enqueue_script( 'TabbedPanels', plugins_url( 'Booking_System' ) . '/js/SpryTabbedPanels.js' , array( 'jquery', 'SpryTabbedPanels' ), '', true );
   
       wp_enqueue_style( 'booking_system-style', plugins_url( 'Booking_System' ) . '/js/SpryTabbedPanels.css' );
       ```
   
 * Thank you in advance 🙂

Viewing 1 replies (of 1 total)

 *  Thread Starter [jealous](https://wordpress.org/support/users/jealous/)
 * (@jealous)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/trouble-with-calling-java-and-css-1/#post-2602812)
 * i have also tried this
 *     ```
       add_action( 'admin_init', 'my_plugin_admin_init' );
       add_action('admin_print_styles-' . $page, 'my_plugin_admin_styles');
       ```
   
 * with…
 *     ```
       public function my_plugin_admin_init() {
       /* Register our script. */
       admin_register_script( 'my_plugin_script', plugins_url('/js/SpryTabbedPanels.js', __FILE__) );
   
       admin_register_script( 'my_plugin_css', plugins_url('/js/SpryTabbedPanels.css', __FILE__) );
       }
       ```
   
 * and then to try and call the fuction this….
 *     ```
       admin_enqueue_script( 'my_plugin_script' );
       	admin_enqueue_script( 'my_plugin_css' );
       ```
   
 * any help would be great thanks
 * _[Stop bumping your topic by posting new topics referencing this one.]_

Viewing 1 replies (of 1 total)

The topic ‘Trouble with calling java and css’ is closed to new replies.

## Tags

 * [java](https://wordpress.org/support/topic-tag/java/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [jealous](https://wordpress.org/support/users/jealous/)
 * Last activity: [14 years, 2 months ago](https://wordpress.org/support/topic/trouble-with-calling-java-and-css-1/#post-2602812)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
