I am trying to test the jqScheduler for PHP within a Drupal CMS Module.
When $eventcal->render(); function is called within a Drupal module, the following code is generated before the <html> section, outside the start of the page.
<style type=text/css>/*
Document : calendar
.
.
.
<script type='text/javascript'>jQuery(document).ready(function() {jQuery.datepicker...
<html xmlns="http://www.w3.org/1999/xhtml" lang="fa" xml:lang="fa">
<head>
Is there a way to intercept above code so that I can place them where I need them.
Example:
$output = "<script type='text/javascript'>jQuery(document).ready(function() .... </script>";
I add css & ja file added this like code
function study_jqScheduler() {
drupal_add_css('sites/all/libraries/jqgrid/themes/redmond/jquery-ui-1.8.16.custom.css');
drupal_add_css('sites/all/libraries/jqgrid/themes/jquery.ui.tooltip.css');
drupal_add_css('sites/all/libraries/jqgrid/themes/ui.jqscheduler.css');
drupal_add_js('sites/all/libraries/jqgrid/js/jquery-ui-custom.min.js');
drupal_add_js('sites/all/libraries/jqgrid/js/jquery.js');
drupal_add_js('sites/all/libraries/jqgrid/js/jquery.jqScheduler.min.js');
require_once "sites/all/libraries/jqgrid/php/jqUtils.php";
require_once "sites/all/libraries/jqgrid/php/jqScheduler.php";
require_once "sites/all/libraries/jqgrid/php/jqGridPdo.php";
require_once "sites/all/libraries/jqgrid/jq-config.php";
global $base_path;
$base_path1=drupal_get_path('module', 'study');
// Set the url from where we obtain the data
ini_set("display_errors",1);
$conn = new PDO(DB_DSN,DB_USER,DB_PASSWORD);
$conn->query("SET NAMES utf8");
$eventcal = new jqScheduler($conn);
$eventcal->setLocale('en_GB');
$eventcal->setUrl($base_path.$base_path1.'/eventcal.php');
$eventcal->setUser(1);
$eventcal->setUserNames(array('1'=>"Calender User 1",'2'=>"Calendar user 2",'3'=>"Calendar user 3") );
$eventcal->multiple_cal = true;
$output.= $eventcal->render();
return $output;
}