http://bastards.alex...art/easyz06.htm
Note that the above link doesn't use PHP at all. It's just an example of what things look like. Here's the code for the page I'm trying to improve:
<h1 align="center">{STAGE_HEADER}</h1>
<div id="puzzle_content" align="center">
<!-- BEGIN stage_image -->
{stage_image.STAGE_IMAGE}
<!-- END stage_image -->
<br />
{STAGE_TEXT}
<br /><br />
<form action="{S_ANSWERCHECK_ACTION}" method="post" name="answercheck">
<input name="guess" type="text" size="{TEXT_FIELD_SIZE}" maxlength="255" />
<input type="submit" name="Submit" value="{STAGE_BUTTON}" />
<input type="hidden" name="n" value="{STAGE_HIDDEN}" />
</form>
<!-- BEGIN wrong_answer -->
<span class="wrong">{wrong_answer.WRONG}</span>
<!-- END wrong_answer -->
</div>
<!-- BEGIN hints_row -->
<!-- {hints_row.HINT} -->
<!-- END hints_row -->
Obviously, I'm using a template system as well. In fact, it's phpBB that I'm using. Anyway, as you can see, the user inputs the answer, the answercheck script is called (the answercheck portion is included in the same file that displays the page...we'll call it puzzle.php), and if the answer is wrong the script fills in all of the stage values (image, button, header, etc) as well as entering in a message indicating that the wrong answer was guessed. I would like the answercheck script to *only* have to update the wrong answer portion when a wrong answer is made. Of course when a correct answer is made it would update everything for the new stage.
I tried messing with AJAX to do this and it worked quite well for wrong answers. Unfortunately, when I put in a correct answer it would load up the new puzzle in <span class="wrong"> portion and I'd have a messed up lookign page with a puzzle within a puzzle. Is it possible to just update one area and only at certain times? I'm pretty confused at this point.

Start a new topic
Add Reply




MultiQuote
| 


