CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.

YesSoftware Forums -> CodeCharge Studio -> Tips & Solutions

 Refresh CAPTCHA image without reloading page

Print topic Send  topic

Author Message

Posts: 64
Posted: 11/23/2015, 2:07 PM

Just recopy 3 functions that are into js/jquery/captcha/ccs-captcha.js into the HEAD section of your HTML page.
These funcitons are:
function qPath(x1, y1, x2, y2, x3, y3)
function qPaths() 
function drawCaptcha(canvas, url, bColor, fColor) 
Then add another function like this:
function reload(){  
  // Get Canvas object from your HTML page  
  var canv = document.getElementById('inc_iscrizionesoggettoCaptcha1Picture');  
  // First of all clear it's contex  
  var context = canv.getContext('2d');  
  context.clearRect(0, 0, canv.width, canv.height);   
  // Set the ajax url that generate codes (note it's the same php page   
  // that generate HTML page with a callbackControl parameter equal to the   
  // id name of CAPTHA control  
  var url = "iscrizione.php?callbackControl=inc_iscrizionesoggettoCaptcha1";  
  // Call JS Function  
  drawCaptcha(canv, url, "255;159;113;0", "51;51;51");  

Thats it.

Now into HTML page simply add a control like this to call the reload() function :

<button onclick="reload()" type="button" class="btn btn-primary">  
      <span class="glyphicon glyphicon-refresh"></span>  
View profile  Send private message

Add new topic Subscribe to topic   

These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit

Internet Database

Visually create Web enabled database applications in minutes.

Home   |    Search   |    Members   |    Register   |    Login

Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by  and YesSoftware, Inc.