Javascript Problem

Shadow121

Member
Messages
901
Reaction score
0
Points
16
I"m trying to make a refresh captcha thing but it doens't seem to be working.
Code:
function refreshCaptcha()
        {
            var imgPath = serverDomain + "verificationimage.png";
            var img = document.getElementById('captcha');
            img.src = imgPath;
            var inputField = document.getElementById('captchaInput');
            if(inputField != null && inputField.value != '')
            {
                inputField.value = '';
                inputField.focus();
            }
        }

It will change the src attribute, but the image will not regenerate.

Yes, serverDomain variable is declared.
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
Please post a complete minimal test case and a link to a live page.
 
Top