Project

General

Profile

« Previous | Next » 

Revision 676

Added by thorn almost 17 years ago

module news: set focus on captcha-field if user have to re-enter captcha

View differences:

comment_page.php
79 79
	<?php
80 80
	if(isset($_SESSION['captcha_error'])) {
81 81
		echo '<font color="#FF0000">'.$_SESSION['captcha_error'].'</font><br />';
82
		unset($_SESSION['captcha_error']);
83 82
		$_SESSION['captcha_retry_news'] = true;
84 83
	}
85 84
	// Captcha
......
92 91
	</tr></table>
93 92
	<br />
94 93
	<?php
94
	if(isset($_SESSION['captcha_error'])) {
95
		unset($_SESSION['captcha_error']);
96
		?><script>document.comment.captcha.focus();</script><?php
97
	}?>
98
	<?php
95 99
	}
96 100
	?>
97 101
	<input type="submit" name="submit" value="<?php echo $TEXT['ADD']; ?> <?php echo $TEXT['COMMENT']; ?>" />

Also available in: Unified diff