need a jump start here

ok, in a nutshell, I have a support site for a client and am now redoing it since he wants the entire back end revamped (it really does need it). Having gotten the index page done, i’m doing sections now.

So here’s what I want to (and I know not all of this requires js)

  1. bring up all the tickets (I can do this in straight php)
  2. on the side, display a button or graphic to allow the person to open or close out the ticket

when the button is clicked, it expands a hidden div (either on top or under topic) with the ticket information

  1. update the ticket

once updated, collapse the div

I don’t have a good enough understanding on how this all works. I know that i’ll need an empty, hidden div for the ticket content, but beyond that, I have no idea what the jquery would look like to accomplish the rest of the stuff.

If someone could point me to some good tutorials or would be willing to do a simple version, I couldn’t pay all that much (don’t have much in ways of money right now), but maybe we can work something out.

Thanks in advance :slight_smile:

Take a look at this

ok, well, that looks easy enough :slight_smile: Just have to figure out how to get the data.

To be perfectly honest, as a developer the way you’re doing it all this fancy jquery/javascript for a back-end CMS is worthless. A real developer would be more paranoid about saving memory/bandwidth and not wasting time having fancy stuff for an area that’s not of the general users interest.

If you do it this way, you’ll either have to use Javascript to pull/update the database or use JQUERY to show a DIV that’s hidden but full of data.

If you’re hiding data and/or elements for any reason, it has no business being there in the first place, it defeats the object of what you’re trying to do which is provide a quick, efficient support service.

Vest your time/energy in creating something that does work quickly & efficiently. There’s no reason not to have it form based and using simple buttons.

Not everybody has Javascript on anyway, I know when I’m on via remote I have JS off by default for security reasons. And JQuery is just a big pile of slow bloat that’s unpredictable between browsers.

There’s only 2 of us using this, so i know we both have js on. Its more about streamlining the process than anything else right now. As i have it now, the ticket comes in, along with an email notification to both parties (us and the client), when the link is clicked on, it opens up another window with the information, then we go from there.

It is form based, but its a slow process that really can’t be done efficiently using multiple windows or pages, that’s why it would be a lot simpler if i could just hit a button or icon, have the information come up on the same page, answer it, and have it disappear again.

As far as bandwidth and memory go, it doesn’t cost either one to have an empty div tag in there when the page loads or to load one ticket on demand. Its not like i’m preloading hundreds of tickets at once or opening them at the same time.

ooohhhh, talk about a brain fart, you can load dynamic content into an iframe can’t you? i could just do that instead of messing with jquery and js.

ok, well I made some progress on this, figured out how to use toggle and get information from a table. Got a question though. Do I have to output the information using smoething like $(’#support_div’).append(“id: “+id+” name: “+vname).append(”


”); (from an example I found in a tutorial), or can I create the form where is supposed to be?

I ask, because I have a really long form and table to put in there (below)

[code]

	<div style="float: left; width: 90px; margin: 0 auto;">
		<input type="submit" name="close" value="close message" />
	</div>

	<div style="float: right;">
		<select name="danswer" id="danswer" >
	<?php
	$ans = mysql_query("SELECT * FROM venzo_contactus_answers") or die(mysql_error());
	while($row = mysql_fetch_array($ans)) {
		echo "<option value='$row[id]'>$row[name]</option>";
	}
	unset($row);
	
	?>
		</select>
		<input type="button" id="a_select" name="select" value="Select" onclick="ajaxFunction();"/>
	</div>
	<input type="hidden" name="id" value="<?=$id?>" />
	<input type="hidden" name="req_id" value="<?=$r['req_id']?>" />
	
</form>
</div>
<div style="clear: both;"> </div>
				
<form action="" method="post" name="myforma" >
	<input type="hidden" name="id" value="<?=$r['id']?>" />
	<input type="hidden" name="req_id" value="<?=$r['req_id']?>" />
	<input type="hidden" name="u_name" value="<?=$r['name']?>" />
	<input type="hidden" name="a_name" value="<?=$_SESSION['adminname']?>" />
	<textarea style="width: 99%;" rows="11" name="n_answer" id="n_answer"><?=strip_slashes_recursive($read)?></textarea>
	<div align="center" style="width: 100%;"><input type="submit" name="Answer" value="Answer" /></div>
</form>[/code]

or am I going about this wrong way?

Sponsor our Newsletter | Privacy Policy | Terms of Service