Language

Български
Add Refresh Button for ImageVerification Печат Е-мейл
Написано от myOltrans    Неделя, 14 Декември 2008 21:43    Последно променен на Неделя, 21 Декември 2008 10:26

ChronoEngine has provided detailed instructions how to add refresh button for ImageVerification at ChronoEngine FAQs page. Here it is what they say:

In chronocontact.php look for:

if ( trim($paramsvalues->imagever) == 'Yes' ) {
$imver = '<input name="chrono_verification" type="text"
id="chrono_verification" value="">
<img src="/'.$mosConfig_live_site
.'/components/com_chronocontact/chrono_verification.php">';
}
Replace this with:
if ( trim($paramsvalues->imagever) == 'Yes' ) {
$imver_url = $mosConfig_live_site
.'/components/com_chronocontact/chrono_verification.php?imtype='
.$paramsvalues->imtype;
$imver = '<script type="text/javascript">
function RefreshImageVer(imgverform) {
var randnum = Math.random();
var newverimage = \''.$imver_url.'\'+randnum;
imgverform.imgver.src=newverimage;
}
</script>
<input name="chrono_verification" type="text" id="chrono_verification" value="">
<img src="/'.$imver_url.'" name="imgver" id="imgver">
<input type="button" value="refresh" onclick="RefreshImageVer(this.form);" />';
}

And presto, one refresh button ready to go. Tested in IE7 and Fx2 From notexa on 2007/09/02 02:35

Please, go to ChronoEngine FAQs page to read the full article.

If you use their code you will notice that the verification image is shown only after clicking on the Refresh button. The solution is to remove the slash from the 13-th row from the new code in the image source. Or replace the code:

            <img src="/'.$imver_url.'" name="imgver" id="imgver">

with:

            <img src="'.$imver_url.'" name="imgver" id="imgver">

Now the verification image will appear from the first time.


blog comments powered by Disqus
 

© Copyright 2008-2011 Oltrans. Translation Agency Recourse Portal.
All rights reserved. Various trademarks held by their respective owners.

Oltrans, 152, 6-ti septemvri Bul., Plovdiv 4000 Bulgaria
General Inquiries: (Bulgaria) +359 32 511 272 | skype: Oltrans.org My status