+ Reply to Thread
Results 1 to 2 of 2

Thread: Javascript Problem

  1. #1
    Shadow121's Avatar
    Shadow121 is offline x10 Lieutenant Shadow121 is an unknown quantity at this point
    Join Date
    Jul 2006
    Location
    Centerville
    Posts
    455

    Javascript Problem

    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.

  2. #2
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: Javascript Problem

    Please post a complete minimal test case and a link to a live page.
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

+ Reply to Thread

Similar Threads

  1. Making a site JavaScript dependent - pros/cons?
    By Tarzan in forum Programming Help
    Replies: 8
    Last Post: 07-11-2008, 10:08 AM
  2. javascript and external javascript files problem
    By delon in forum Programming Help
    Replies: 6
    Last Post: 04-27-2008, 12:41 AM
  3. JavaScript problem
    By anuj_web in forum Programming Help
    Replies: 25
    Last Post: 04-24-2008, 05:15 AM
  4. XML and Javascript
    By cuteboytm in forum Graphics & Webdesign
    Replies: 1
    Last Post: 09-21-2007, 10:00 AM
  5. Problem with ad code (includes?)
    By Salvatos in forum Free Hosting
    Replies: 10
    Last Post: 12-12-2006, 04:16 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers