automatic selected dropdown date PHP (with joomla) - php

at first sorry for my english. I have a problem with my website. I have 2 dropdown with date see the image (inizio=start, fine=end). I would like that when I click the START DATE, the END DATE changes (automatically) to one hour more than the start date. For example: In "inizio" I select the following date: 16 agosto (August) 2017 14:30, the END DATE should changes automatically in 16 agosto 2017 15:30. Default.php:
<tr height="50px">
<td align="center" style="border-color:white; border:0px; background-color:#F8F9FA;"><br /><b><font size="+1">Inizio</font></b></td>
<td align="center" style="border-color:white; border:0px; background-color:#F8F9FA;"><br />' . $this->helper->dateTimePicker("inizio", "DATETIME") . '</td>
</tr>
<tr height="50px">
<td align="center" style="border-color:white; border:0px; background-color:#F8F9FA;"><b><font size="+1">Fine</font></b></td>
<td align="center" style="border-color:white; border:0px; background-color:#F8F9FA;">' . $this->helper->dateTimePicker("fine", "DATETIME") . '</td>
</tr>
Method dataTimePicker:
function dateTimePicker($dpname, $mode = "DATE") // MODES: "DATE" or "DATETIME"
{
$control = "";
$anni_da_visualizzare = 2;
if ($mode == "DATE" || $mode == "DATETIME")
{
$control .= '<select name="giorno_'.$dpname.'">';
for ($i = 1; $i <= 31; $i++)
{
if ($i == date("j"))
{
$control .= '<option value="'.$i.'" selected="selected">'.$i.'</option>';
}
else
{
$control .= '<option value="'.$i.'">'.$i.'</option>';
}
}
$control .= '</select>';
//=================================
$control .= " ";
$mesi = array("Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre");
$control .= '<select name="mese_'.$dpname.'">';
for ($i = 1; $i <= 12; $i++)
{
if ($i == date("n"))
{
$control .= '<option value="'.$i.'" selected="selected">'.$mesi[$i-1].'</option>';
}
else
{
$control .= '<option value="'.$i.'">'.$mesi[$i-1].'</option>';
}
}
$control .= '</select>';
//=================================
$control .= " ";
$control .= '<select name="anno_'.$dpname.'">';
$inizio = date("Y");
$fine = date("Y") + $anni_da_visualizzare;
for ($i = $inizio; $i <= $fine; $i++)
{
if ($i == date("Y"))
{
$control .= '<option value="'.$i.'" selected="seected">'.$i.'</option>';
}
else
{
$control .= '<option value="'.$i.'">'.$i.'</option>';
}
}
$control .= '</select>';
//=================================
$control .= " ";
if ($mode == "DATETIME")
{
//H - ore_$dpname !
$control .= '<select name="ore_'.$dpname.'">';
for ($i = 0; $i <= 23; $i++)
{
if ($i == date("G"))
{
$control .= '<option value="'.$i.'" selected="selected">'.($i < 0 ? '0'.$i : $i).'</option>';
}
else
{
$control .= '<option value="'.$i.'">'.($i < 10 ? '0'.$i : $i).'</option>';
}
}
$control .= '</select>';
//=================================
$control .= " ";
//Minutes- minuti_$dpname !
$control .= '<select name="minuti_'.$dpname.'">';
for ($i = 0; $i <= 3; $i++)
{
if (intval(date("i")) < ($i*15) && intval(date("i")) > (($i*15) - 15))
$control .= '<option value="'.($i*15).'" selected="selected">'.($i == 0 ? '00' : (15*$i)).'</option>';
else
$control .= '<option value="'.($i*15).'">'.($i == 0 ? '00' : (15*$i)).'</option>';
}
$control .= '</select>';
//=================================
$control .= " ";
}
return $control."<br />";
}
else
{
return "{<u>dateTimePicker ERROR:</u> modalità non valida}";
}
}

Have a look at this documentation
It would be best to use jquery for this. You would have to add something like $(".time2").val('2'); within the onchange of time1. Where the amount in val is equal to the time plus 1 hour.
Time1 - being the first date and time class
Time2 - being the second date and time class

Related

Having some diffculty parsing tree data in ul li format in php

i'm try to create trial balance i somehow achieve tree view in my array and now i want to print my code but don't know how to make tree because i don't know how many children i can get in future and i'm not very good at recursion below is my tree prepared array and i also attach my result that i can make via foreach loop but stuck in children node i can make children nodes via foreach but the problem is it's not a best approach to follow so please help me out to print my tree structure data as per my array. Any help would be appreciated.
Here my tree array look like : Tree Array
My result look like this this is only root nodes of an array and i using jstree to show hierarchy.
<?
$total_opening_debit = 0;
$total_opening_credit = 0;
$total_debit = 0;
$total_credit = 0;
foreach($this->trees as $key => $value)
{
foreach($value as $tree)
{
if($tree["id"] != "")
{
?>
<li>
<span class="first"><? echo $tree["name"]; ?></span>
<span class="other">
<?
if ($tree["opening_debit"] > $tree["opening_credit"])
{
echo format_currency($tree["opening_debit"] - $tree["opening_credit"], 2) . " Dr.";
}
elseif ($tree["opening_credit"] > $tree["opening_debit"])
{
echo format_currency($tree["opening_credit"] - $tree["opening_debit"], 2) . " Cr.";
}
else
{
echo "0";
}
$total_opening_debit += $tree["opening_debit"];
$total_opening_credit += $tree["opening_credit"];
?>
</span>
<span class="other">
<?
if($tree["period_debit"]<>"" && $tree["period_debit"]<>"0")
{
echo format_currency($tree["period_debit"], 2);
$total_debit += $tree["period_debit"];
}
else
{
echo 0;
}
?>
</span>
<span class="other">
<?
if($tree["period_credit"]<>"" && $tree["period_credit"]<>"0")
{
echo format_currency($tree["period_credit"], 2);
$total_credit += $tree["period_credit"];
}
else
{
echo 0;
}
?>
</span>
<span class="other">
<?
if ($tree["opening_debit"] + $tree["period_debit"] > $tree["opening_credit"] + $tree["period_credit"])
{
$closing = format_currency($tree["opening_debit"] + $tree["period_debit"] - $tree["opening_credit"] - $tree["period_credit"], 2) . " Dr.";
}
elseif ($tree["opening_credit"] + $tree["period_credit"] > $tree["opening_debit"] + $tree["period_debit"])
{
$closing = format_currency($tree["opening_credit"] + $tree["period_credit"] - $tree["opening_debit"] - $tree["period_debit"], 2) . " Cr.";
}
else
{
$closing = "0";
}
echo $closing;
//calculate all opeing and closing debit & credit.
if ($tree["opening_debit"] + $tree["period_debit"] > $tree["opening_credit"] + $tree["period_credit"])
{
$total_closing_debit += ($tree["opening_debit"] + $tree["period_debit"] - $tree["opening_credit"] - $tree["period_credit"]);
}
if ($tree["opening_credit"] + $tree["period_credit"] > $tree["opening_debit"] + $tree["period_debit"])
{
$total_closing_credit += ($tree["opening_credit"] + $tree["period_credit"] - $tree["opening_debit"] - $tree["period_debit"]);
}
?>
</span>
<?
if(count($tree["children"]) > 0)
{
//make_children_tree();
}
?>
</li>
<?
}
}
}
?>
i solved myself here what approach i choose i extract children array into other array and on that array i use my recursion to do magic.
<? $array = $trial_tree["children"]; ?>
$trial_balance_tree = $this->trees;
$total_opening_debit = 0;
$total_opening_credit = 0;
$total_debit = 0;
$total_credit = 0;
$total_closing_debit = 0;
$total_closing_credit = 0;
$total_opening = 0;
$total_closing = 0;
function makeListItems($a) {
global $total_opening_debit,$total_opening_credit,$total_credit,$total_debit,$total_closing_debit,$total_closing_credit,$total_opening,$total_closing;
$out = '';
foreach($a as $val) {
//print_r($key); echo is_array($val);exit;
if($val["id"] > 0)
{
$out .= '<li>';
$out .= "<span class='first'>" . $val["name"] . "</span>";
$out .= "<span class='other'>";
if ($val["opening_debit"] > $val["opening_credit"])
{
$out .= format_currency($val["opening_debit"] - $val["opening_credit"], 2) . " Dr.";
}
elseif ($val["opening_credit"] > $val["opening_debit"])
{
$out .= format_currency($val["opening_credit"] - $val["opening_debit"], 2) . " Cr.";
}
else
{
$out .= "0";
}
$total_opening_debit += $val["opening_debit"];
$total_opening_credit += $val["opening_credit"];
$out .= "</span>";
$out .= "<span class='other'>";
if($val["period_debit"]<>"" && $val["period_debit"]<>"0")
{
$out .= format_currency($val["period_debit"], 2);
$total_debit += $val["period_debit"];
}
else
{
$out .= 0;
}
$out .= "</span>";
$out .= "<span class='other'>";
if($val["period_credit"]<>"" && $val["period_credit"]<>"0")
{
$out .= format_currency($val["period_credit"], 2);
$total_credit += $val["period_credit"];
}
else
{
$out .= 0;
}
$out .= "</span>";
$out .= "<span class='other'>";
if ($val["opening_debit"] + $val["period_debit"] > $val["opening_credit"] + $val["period_credit"])
{
$closing = format_currency($val["opening_debit"] + $val["period_debit"] - $val["opening_credit"] - $val["period_credit"], 2) . " Dr.";
}
elseif ($val["opening_credit"] + $val["period_credit"] > $val["opening_debit"] + $val["period_debit"])
{
$closing = format_currency($val["opening_credit"] + $val["period_credit"] - $val["opening_debit"] - $val["period_debit"], 2) . " Cr.";
}
else
{
$closing = "0";
}
$out .= $closing;
//calculate all opeing and closing debit & credit.
if ($val["opening_debit"] + $val["period_debit"] > $val["opening_credit"] + $val["period_credit"])
{
$total_closing_debit += ($val["opening_debit"] + $val["period_debit"] - $val["opening_credit"] - $val["period_credit"]);
}
if ($val["opening_credit"] + $val["period_credit"] > $val["opening_debit"] + $val["period_debit"])
{
$total_closing_credit += ($val["opening_credit"] + $val["period_credit"] - $val["opening_debit"] - $val["period_debit"]);
}
$out .= "</span>";
if(array_key_exists('children', $val)) {
$out .= makeList($val['children']);
}
$out .= '</li>';
}
}
return $out;
}
function makeList($a) {
$out = '<ul>';
$out .= makeListItems($a);
$out .= '</ul>';
return $out;
}
?>
<table style="width:100%;background-color: #A5C6DB;">
<tr>
<th class="table_first" style="width:42.5%;">Ledger Name</th>
<th class="table_other" style="width:14.7%;">Opening</th>
<th class="table_other" style="width:14.7%;">Debit</th>
<th class="table_other" style="width:14.7%;">Credit</th>
<th class="table_other" style="width:15%;">Closing</th>
</tr>
</table>
<?
echo "<div id='trial_balance_tree'>";
echo makeList($trial_balance_tree);
echo "</div>";
Now my view look like this and thats exactly i want.

How create matrix dynamic using PHP MySQL

Can any one help me? I found difficult about create matrix dynamic using PHP programming. I want value of matrix dynamic from mysql database.
Such as example :
INF 56 78 67
45 INF 78 67
45 56 INF 67
45 56 78 INF
This code it :
function random()
{
$max = 7;
if (isset($_POST['amount']))
{
$amount = (int)$_POST['amount'];
$rows = ($amount > 2 && $amount < 15) ? $amount : 3;
}
else
{
$rows = rand(3, 7);
}
for ($i = 1; $i <= $rows; $i++)
{
for ($j = 1; $j <= $rows; $j++)
{
$this->table[$i][$j] = $i == $j ? INF : rand(0, 99);
}
}
}
function __toString()
{
$str = '<table class="table table-bordered" id="tableInput"><tbody>';
$str .= '<tr><td></td>';
foreach ($this->table as $rowName => $row)
{
$str .= "<td>$rowName</td>";
}
$str .= '</tr>';
foreach ($this->table as $rowName => $row)
{
$str .= "<tr><td>$rowName</td>";
foreach ($row as $columnName => $value)
{
$str .= "<td>";
$str .=
'<input class="form-control" type="text" value="' . $value . '" name="table[' . $rowName . '][' .
$columnName . ']" requied' . ($columnName == $rowName ? ' disabled' : '') . '>';
$str .= "</td>";
}
$str .= '</tr>';
}
$str .= '</tbody></table>';
return $str;
}
Thanks

PHP paging from MySQL

I have problem with my paging PHP script.
First page works perfectly, but next pages are blank.
Config.php include database setting like host etc.
Please help me solve my problem.
Thanks in advance.
Here is my code:
include 'config.php';
mysql_connect($iplogow, $userlogow, $haslologow) or die("Mysql error: " . mysql_error());
mysql_select_db($bazalogow)or die("Błąd bazy danych: " . mysql_error());
echo '<br>
<table class="table table-bordered table-striped" width="500px">
<thead>
<tr>
<th>table1</th>
<th>table2</th>
<th>table3</th>
<th>table4</th>
<th>table5</th>
<th>table6</th>
<th>table7</th>
</tr></thead>';
$result = mysql_query("SELECT Count(id) FROM `logi`");
$row = mysql_fetch_row($result);
$count_users = $row[0];
$per_page = 10;
$pages = ceil($count_users / $per_page);
$current_page = !isset($_GET['page']) ? 1 : (int)clear($_GET['page']);
if($current_page < 1 || $current_page > $pages) {
$current_page = 1;
}
if($count_users > 0) {
$result = mysql_query("SELECT * FROM `logi` ORDER BY `id` DESC LIMIT ".($per_page*($current_page-1)).", ".$per_page);
while($row = mysql_fetch_assoc($result)) {
echo '<tr>
<td>'.$row['nick'].'</td>
<td>'.$row['ip'].'</td>
<td>'.$row['password'].'</td>
<td>'.$row['productid'].'</td>
<td>'.$row['client'].'</td>
<td>'.$row['date'].'</td>
<td>'.$row['hour'].'</td>
</tr>';
}
} else {
echo '<tr>
<td colspan="3" style="text-align:center">Niestety nie znaleziono żadnych ataków.</td>
</tr>';
}
echo '</table>';
if($pages > 0) {
echo '<p>';
if($pages < 11) {
for($i = 1; $i <= $pages; $i++) {
if($i == $current_page) {
echo '<b>['.$current_page.']</b> ';
} else {
echo '['.$i.'] ';
}
}
} elseif($current_page > 10) {
echo '[1] ';
echo '[2] ';
echo '[...] ';
for($i = ($current_page-3); $i <= $current_page; $i++) {
if($i == $current_page) {
echo '<b>['.$current_page.']</b> ';
} else {
echo '['.$i.'] ';
}
}
for($i = ($current_page+1); $i <= ($current_page+3); $i++) {
if($i > ($pages)) break;
if($i == $current_page) {
echo '<b>['.$current_page.']</b> ';
} else {
echo '['.$i.'] ';
}
}
if($current_page < ($pages-4)) {
echo '[...] ';
echo '['.($pages-1).'] ';
echo '['.$pages.'] ';
} elseif($current_page == ($pages-4)) {
echo '[...] ';
echo '['.$pages.'] ';
}
} else {
for($i = 1; $i <= 11; $i++) {
if($i == $current_page) {
if($i > ($pages)) break;
echo '<b>['.$current_page.']</b> ';
} else {
echo '['.$i.'] ';
}
}
if($pages > 12) {
echo '[...] ';
echo '['.($pages-1).'] ';
echo '['.$pages.'] ';
} elseif($pages == 12) {
echo '[...] ';
echo '[12] ';
}
}
echo '</p>';
}
?>
Have you included the clear() function?
Look at line: $current_page = !isset($_GET['page']) ? 1 : (int)clear($_GET['page']);
If you have not included the function then you will get a fatal error in the execution of the script. Try to remove the clear() all together and see what happens, the changed line should be
$current_page = !isset($_GET['page']) ? 1 : $_GET['page'];

PHP getting days of a month for a database

I'm making a calender planner with php/css/javascript/html.
I am trying to set each day of the month a class which is "day". I tried using the following:
**PHP CODE**
error_reporting(E_ALL);
ini_set('display_errors', '1');
include "scripts/connect_to_mysql.php";
$jobNameValue ='';
$monthDays = '';
$monthname = '';
$days = '';
//getting values for job names
$sql_job_name = mysql_query("SELECT * FROM jobs");
$num_job_name = mysql_num_rows($sql_job_name);
if($num_job_name >0) {
while ($row = mysql_fetch_array($sql_job_name)) {
$job_name = $row["job_name"];
$job_short_name = $row["job_short_name"];
$jobNameValue .= '<option value="' . $job_short_name . '">' . $job_name . '</option>';
}
} else {
$jobNameValue .= '<option value="NULL">No job listed</option>';
}
//getting values for months days
$sql_month_days = mysql_query("SELECT * FROM months");
$num_month_days = mysql_num_rows($sql_month_days);
if($sql_month_days > 0) {
while($row = mysql_fetch_array($sql_month_days)) {
$month_id = $row["id"];
$name = $row["name"];
$num_days = $row["num_days"];if($num_days === "31") {
for($i=1; $i <=31; $i++) {
$days .= '<span class="day">' . $i . '</span>';
}
} else {
if($num_days === "30") {
for($i=1; $i <=30; $i++) {
$days .= '<span class="day">' . $i . '</span>';
}
} else {
if($num_days === "29") {
for($i=1; $i <=29; $i++) {
$days .= '<span class="day">' . $i . '</span>';
}
}
}
}
$monthDays .= '<div id="monthContainer">
<span class="monthName">'. $name .'</span>
<div class="monthDaysContainter">
'. $days.'
</div>
</div>';
}
}
**HTML CODE**
<div id="container">
<div ="newJob">
<form action="<?php $_SERVER['PHP_SELF'] ?>" id="newJobForm">
<label for="jobName">Job Name:</label>
<select id="jobName">
<?php echo $jobNameValue; ?>
</select>
<input type="date">
<input type="submit" id="submit">
</form>
</div>
<div id="calander">
<?php echo $monthDays; ?>
</div>
</div>
It does not work correctly, it kept duplicating every month and I am not sure how to correctly right the php to achieve what was intended.
I am only a beginner at php so I am not good at the moment
Could anyone help me with this?
If there any more information you need, please don't hesitate to ask.
Thank you in advance!
Chris
Try just doing this and seeing if that fixes it, you don't need all of those if statements
for($i=1; $i <= $num_days; $i++) {
$days .= '<span class="day">' . $i . '</span>';
}
do not use ===,use ==,maybe your $num_days is integer
Your problem is that you are creating the whole thing in the while loop, so the days that are appended from the last call are also appended to the next output.
$tmpArray = array();
if($sql_month_days > 0) {
while($row = mysql_fetch_array($sql_month_days)) {
array_push($tmpArray, $row);
}
}
foreach($tmpArray as $k){
$monthDays .= '<div id="monthContainer"><span class="monthName">'. $k['name'] .'</span><div class="monthDaysContainter">'. calNumDays($k['num_days']).'</div></div>';
}
Update
Should you wish to keep what you already have
if($num_days === "31") {
$days = '';
for($i=1; $i <=31; $i++) {
$days .= '<span class="day">' . $i . '</span>';
}
} else {
if($num_days === "30") {
$days = '';
for($i=1; $i <=30; $i++) {
$days .= '<span class="day">' . $i . '</span>';
}
} else {
if($num_days === "29") {
$days = '';
for($i=1; $i <=29; $i++) {
$days .= '<span class="day">' . $i . '</span>';
}
}
}
}
You only really to need to reinitialize the $days before each for after the if

Ajax mouseover show function alignment

I am trying to open a box by using mouseover function, however the box always shows on the right part of the object. Hence when the object is right end of the page, the whole box cannot be seen as shown in this photo.
https://rapidshare.com/files/998669066/problem.png
Here is my ajax code:
$(document).ready(function() {
$('.date-available').click(function() {
alert($(this).attr('id'));
});
$('.rezerve-td').mouseover(function() {
$(this).children().show();
}).mouseout(function() {
$(this).children().hide();
});
});
What should i do in order prevent it? Thanks.
Here is the html part of my code:
require_once 'class.dates.php';
require_once 'class.generic.php';
require_once 'connection.php';
$query = mysql_query("SELECT * FROM egitim_salonu", $baglanti);
while ($row = mysql_fetch_object($query)) {
$salonlar[$row->id] = array('ad' => $row->ad, 'detay' => $row->detay);
}
$query = mysql_query("SELECT * FROM salon_rezervasyonu", $baglanti);
while ($row = mysql_fetch_object($query)) {
$rezervasyonlar[$row->salon_id.'%'.$row->gun.'%'.$row->tip] = array('salon_id' => $row->salon_id, 'gun' => $row->gun, 'tip' => $row->tip, 'rezerve_edildigi_egitim' => $row->rezerve_edildigi_egitim);
}
$month = date('m', strtotime($_POST['d']));
$year = date('Y', strtotime($_POST['d']));
$date = date('F Y', strtotime('01-'.$month.'-'.$year));
if ($month == 1 || $month == 3 || $month == 5 || $month == 7 || $month == 8 || $month == 10 || $month == 12) {
$numberOfDays = 31;
} else if ($month == 4 || $month == 6 || $month == 9 || $month == 11) {
$numberOfDays = 30;
} else if (date('L', strtotime($year.'-01-01'))) {
$numberOfDays = 29;
} else {
$numberOfDays = 28;
}
// Tabloyu aç, başlığı hazırla
$output = '<table class="calendar" id="salon-rezervasyon-table">
<thead>
<tr><th rowspan="2">Salon</th><th colspan="'.(2 * $numberOfDays).'">'.$date.'</th></tr>
<tr>';
for ($i = 1; $i <= $numberOfDays; $i++) {
$output .= '<th width="10" colspan="2" class="day-th">'.$i.'</th>';
}
// Başlığı kapat, gövdeyi aç
$output .= '</tr></thead><tbody>';
// Her salon için...
foreach ($salonlar as $salonKey => $salonValue) {
$output .= '<tr id="salon-'.$salonKey.'"><td class="calendar-salon-column">'.$salonValue['ad'].'<br />'.$salonValue['detay'].'</td>';
// ... o ay içindeki günleri kontrol et. Burada kontrol için şunu yapıyoruz: salon id'si, tarih ve gün içerisindeki saati (öğleden önce, öğleden sonra)
// birleştirerek bir index (bu index unique bir index) oluşturuyoruz ve bu index yukarıdaki rezervasyonlar dizisinde tanımlanmış mı diye kontrol ediyoruz.
for ($i = 1; $i <= $numberOfDays; $i++) {
$dateCheck = date('Y-m-d', strtotime($i.'-'.$month.'-'.$year));
$rIndexOO = $salonKey.'%'.$dateCheck.'%Öğleden önce';
$rIndexOS = $salonKey.'%'.$dateCheck.'%Öğleden sonra';
//Öğleden önce
if(isset($rezervasyonlar[$rIndexOO])) {
$egitimPlaniQuery = mysql_query("SELECT * FROM egitim_plani WHERE id = ".$rezervasyonlar[$rIndexOO]['rezerve_edildigi_egitim'], $baglanti);
$egitimPlani = mysql_fetch_object($egitimPlaniQuery);
$output .= '<td id="'.$dateCheck.'%o" class="calendar-td rezerve-td">';
$output .= '<div class="rezerve">'.date('d-m-Y', strtotime($dateCheck)).' Öğleden Önce<br /><br />'.$egitimPlani->egitim_adi.'</div>';
$output .= '</td>';
} else {
$output .= '<td id="'.$dateCheck.'%o" class="date-available calendar-td">';
$output .= '';
$output .= '</td>';
}
//Öğleden sonra
if(isset($rezervasyonlar[$rIndexOS])) {
$egitimPlaniQuery = mysql_query("SELECT * FROM egitim_plani WHERE id = ".$rezervasyonlar[$rIndexOO]['rezerve_edildigi_egitim'], $baglanti);
$egitimPlani = mysql_fetch_object($egitimPlaniQuery);
$output .= '<td id="'.$dateCheck.'%s" class="calendar-td rezerve-td">';
$output .= '<div class="rezerve">'.date('d-m-Y', strtotime($dateCheck)).' Öğleden Sonra<br /><br />'.$egitimPlani->egitim_adi.'</div>';
$output .= '</td>';
} else {
$output .= '<td id="'.$dateCheck.'%o" class="date-available calendar-date-separator">';
$output .= '';
$output .= '</td>';
}
}
$output .= '</tr>';
}
$output .= '</tbody></table>';
echo $output;
You could probably fix this with some css.
div.rezerve {
position: absolute
}
If it still shows up off the page, you can add something like this to your javascript
....
var doc_width = $(document).width();
var rezerve_child = $(this).children();
rezerve_child.show();
var position = rezerve_child.offset();
var rezerve_child_width = rezerve_child.width();
if (position.left + rezerve_child_width > doc_width) {
$(this).css('right', '2px');
}
....
The jQuery Tooltip plugin would also probably be helpful.
http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/

Categories