• 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

    (@jealous)

    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.