Why the captcha dosen't change?

Hi there!

I am developing a login function.
When I click the captcha, the number should be changed.
On chrome and IE, it’s OK.

But, on firefox, it doesn’t change.

My code:

<img src="" id="Forgot_Verification_Code_Img" style="cursor: pointer;display:none;" onclick="this.src+=''" alt="<?php echo $Lang['Verification_Code']; ?>" align="middle" />

Where is the problem?

I have the same problem but on Chrome. Have you found a solution?

I have a new problem!
On firefox, the captcha worked now,
but, when I click the text box, the captcha numbers return to the initial numbers every time.
1

My current code is

<form action="<?php echo $Config['WebsitePath']; ?>/login" method="post" onsubmit="JavaScript:this.Password.value=md5(this.Password.value);">
				<input type="hidden" value="<?php echo $RequestURI; ?>" name="ReturnUrl" />
				<input type="hidden" name="FormHash" value="<?php echo $FormHash; ?>" />
				<input type="hidden" name="Expires" value="30" />
				<p><label><input type="text" name="UserName" id="UserName" class="w200" value="" placeholder="<?php echo $Lang['UserName']; ?>" onblur="CheckUserNameExist()" /></label></p>
				<p><label><input type="password" name="Password" class="w200" value="" placeholder="<?php echo $Lang['Password']; ?>" /></label></p>
				<p><label><input type="text" name="VerifyCode" class="w100" onfocus="document.getElementById('Verification_Code_Img').src='<?php echo $Config['WebsitePath']; ?>/seccode.php';document.getElementById('Verification_Code_Img').style.display='inline';" value="" placeholder="<?php echo $Lang['Verification_Code']; ?>" /></label> 
				<img src="" id="Verification_Code_Img" style="cursor: pointer;display:none;" onclick="this.src=this.src+'?'" alt="<?php echo $Lang['Verification_Code']; ?>" align="middle" /></p>
				<p><input type="submit" value="<?php echo $Lang['Log_In']; ?>" name="submit" class="textbtn" style="margin:0 78px;" /></p>
				<p class="fs14 text-center">
					<a href="<?php echo $Config['WebsitePath']; ?>/register"><?php echo $Lang['Sign_Up']; ?></a>&nbsp;&nbsp;&nbsp;&nbsp;
					<a href="<?php echo $Config['WebsitePath']; ?>/forgot"><?php echo $Lang['Forgot_Password']; ?></a>
				</p>
			</form>

How to improve my code?

Hi there!

I have a problem with Captcha.
when I click the text box, the captcha numbers return to the initial numbers every time.
This problem only happened on firefox, On chrome everything is OK.

1

My current code is

<form action="<?php echo $Config['WebsitePath']; ?>/login" method="post" onsubmit="JavaScript:this.Password.value=md5(this.Password.value);">
				<input type="hidden" value="<?php echo $RequestURI; ?>" name="ReturnUrl" />
				<input type="hidden" name="FormHash" value="<?php echo $FormHash; ?>" />
				<input type="hidden" name="Expires" value="30" />
				<p><label><input type="text" name="UserName" id="UserName" class="w200" value="" placeholder="<?php echo $Lang['UserName']; ?>" onblur="CheckUserNameExist()" /></label></p>
				<p><label><input type="password" name="Password" class="w200" value="" placeholder="<?php echo $Lang['Password']; ?>" /></label></p>
				<p><label><input type="text" name="VerifyCode" class="w100" onfocus="document.getElementById('Verification_Code_Img').src='<?php echo $Config['WebsitePath']; ?>/seccode.php';document.getElementById('Verification_Code_Img').style.display='inline';" value="" placeholder="<?php echo $Lang['Verification_Code']; ?>" /></label> 
				<img src="" id="Verification_Code_Img" style="cursor: pointer;display:none;" onclick="this.src=this.src+'?'" alt="<?php echo $Lang['Verification_Code']; ?>" align="middle" /></p>
				<p><input type="submit" value="<?php echo $Lang['Log_In']; ?>" name="submit" class="textbtn" style="margin:0 78px;" /></p>
				<p class="fs14 text-center">
					<a href="<?php echo $Config['WebsitePath']; ?>/register"><?php echo $Lang['Sign_Up']; ?></a>&nbsp;&nbsp;&nbsp;&nbsp;
					<a href="<?php echo $Config['WebsitePath']; ?>/forgot"><?php echo $Lang['Forgot_Password']; ?></a>
				</p>
			</form>

How to improve my code?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.