well, i’m back on the support again, refining it yet again. This time i’m working on the public side. I have a page that’ll pull up all the user’s tickets. Right now, when they click on the topic, it opens on a seperate page. but what what we want to happen is when they click on the topic, have it open on top of the page, instead of in a seperate window.
If i could have the window or area open to start with, i could do this with straight ajax, but i don’t want the div to be visible when they enter the page, and i want it hidden after they submit the update.
This is the code so far (no js so far)
[php]
<!-- display ticket window -->
<div style="width: 930px; margin: 0 auto; padding-top: 10px; ">
</div>
<div style="width: 930px; margin: 0 auto; padding-top: 10px;">
<table cellpadding="2" cellspacing="1" border="0" style="width: 100%; font-size: 12px;">
<tr>
<td style="text-align: center;">Req ID</td>
<td style="text-align: center;">Status</td>
<td style="text-align: center;">Submitted On</td>
<td style="text-align: center;">Topic</td>
<td style="text-align: center;">Answered by</td>
<td style="text-align: center;">Updated On</td>
</tr>
<?php
$date = date("Y-m-d");
$CurDate = strtotime($date);
$yesterday = strtotime("-1 day", $CurDate);
for($i = 0; $i < $numrows; $i++) {
$r = mysql_fetch_array($query);
$compare = strtotime($r['date']);
if($compare > $yesterday) {
$new = "<span style='color: red;'>$r[req_id]</span>";
} else {
$new = $r['req_id'];
}
if($r['status'] == 0) {
$status = "Answered";
} else if($r['status'] == 1) {
$status = "On Hold";
} else if($r['status'] == 2) {
$status = "New";
} else if($r['status'] == 3) {
$status = "A.C.R";
} else if($r['status'] == 4) {
$status = "Closed";
}
if($r['subject'] == "") {
$r['subject'] = "Test";
}
if($r['last_answered_by'] == "") {
$ans = "<span style='color: red;'>Open</span>";
} else {
$ans = $r['last_answered_by'];
}
if($i % 2) {
echo "<tr bgcolor='#FFE6CC'>\n";
} else {
echo "<tr bgcolor='white'>\n";
}
if(empty($r['last_answered_by'])) {
$ans = "";
} else {
$val = explode(', ', $r['last_answered_by']);
$ans = end($val);
}
?>
<td style="width: 30px; padding-right: 10px; text-align: left;"><?php echo $new; ?></td>
<td style="width: 40px; padding-right: 10px; text-align: center;"><?php echo $status; ?></td>
<td style="width: 140px; padding-right: 10px; text-align: center;"><?php echo $r['createdon'] ?></td>
<td><a href="http://vmg.venzodigital.com/public_check_inquiries.php?req_id=<?= $r['req_id']?>" target="_tab" ><?php echo truncate(stripslashes($r['subject'])); ?></a></td>
<td style="width: 120px;"><?php echo $ans; ?></td>
<td style="width: 140px; text-align:center;"><?php echo $r['date'] ?></td>
</tr>
<?php } ?>
</table>
</div>
<?php } ?>[/php]
any thoughts or ideas would be greatly appreciated.