here is the code in code tags
[PHP]$poraka="Dali sakas";
foreach($rezBilet as $rezB)
{
echo '<tr>';
echo '<td align="center"><a href="?modifyRezBilet='.
htmlentities($rezB['TURIST_ID'])." ".htmlentities($rezB['B_ID']).'" /><img src="../images/edit.png" width="24" height="24" border="0" /></a></td>';
echo '<td align="center"><a href="?deleteRezBilet='.
htmlentities($rezB['TURIST_ID'])." ".htmlentities($rezB['B_ID']).'" /><img src="../images/delete2.png" width="24" height="24" border="0" /></a></td>';
echo '<td>'.$rezB['TURIST_ID'].'<a href="?showTur='.
htmlentities($rezB['TURIST_ID']).'" onclick="showListTurist();return false;" /><img align="right" src="../images/details.png" width="14" height="14" border="0" /></a></td>';
echo '<td>'.$rezB['B_ID'].'<a href="?showBil='.
htmlentities($rezB['B_ID']).'" onclick="showListBilet(); return false;" /><img align="right" src="../images/details.png" width="14" height="14" border="0" /></a></td>';
echo '<td>'.$rezB['REZ_DATA'].'</td>';
echo '<td>'.$rezB['KOLICINA'].'</td>';
echo '</tr>';
}
echo <<<END
<tr><form method="post" action="$posRezBilet1"><td align="center">
<a href="?newRezBilet2=vnesi" /><img src="../images/user1_add.png" width="36" height="36" border="0" /></a></td><td colspan="1" align="center">
<input type="submit" value="Додади нова резервација" name="newRezBilet" class="button">
</td>
<td colspan="2"><div align="center">
<input type="submit" value="< Претходни $step" name="previousRezBilet" class="button">
<input type="submit" value="Следни $step >" name="nextRezBilet" class="button">
</div>
</td>
<td>
<select name="cekor" style="background:#F1D798" onchange="MM_jumpMenu('parent',this,0)">
<option value="" style="background:#F1D798">прикажи</option>
<option value="?cekor=5" style="background:#F1D798">5</option>
<option value="?cekor=10" style="background:#F1D798">10</option>
<option value="?cekor=15" style="background:#F1D798">15</option>
<option value="?cekor=20" style="background:#F1D798">20</option>
<option value="?cekor=25" style="background:#F1D798">25</option>
<option value="?cekor=30" style="background:#F1D798">30</option>
</select>
</td>
<td align="center">$currPage/$maxPage Страна</td>
</tr>
</form>
</table></center>
END;
}
} [/PHP]
this is only the part where I call the functions, and here are the JavaScript functions
- function showListTurist()
-
{
-
<?php
-
$_SESSION['showTur']=$_GET['showTur'];
-
?>
-
sList = window.open("turist_prozorecB.php", "turist", "width=800,height=200, scrollbars=yes");
-
}
-
-
function showListBilet()
-
{
-
<?php
-
$_SESSION['showBil']=$_GET['showBil'];
-
echo "neso";
-
?>
-
sList = window.open("bilet_prozorecB.php", "bilet", "width=800,height=100, scrollbars=1");
-
}
The code prints the values stored the array $rezBilet in a table and I want when you press on the picture 'details' to open new window. That's why I call the JavaScript function. But I also want to send the variable $rezB['TURIST_ID'] to the new window that opens, so thats why I use href=?showTur..., and then in the JavaScript function I put it in session.
I don't get any kind of errors, it does nothing, and the biggest problem is, that I that I haven't changed much. I only added some things but on the other part of the script that has not much connection whit this (I think). It just stop working.
Just adds the value from $rezB['TURIST_ID'] to showTur, but it doesn't call the JavaScript functions.
Sorry that I didn't write correctly the previous post, but I'm new at this.