If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

this is my code i m working on... file name is login.jsp having another file vcaptcha.jsp i want when the user click on refresh button only the captcha made by vcaptcha.jsp is refreshed not the whole page.. i have not much idea abt jsp and javascript... so please hell me out in this matter..

Now i m going to tell u my real problem as i have a hope u can help me out...

i have to build a captcha with both visual and audio captcha i m able to made visual captcha but not audio captcha with the help of vcaptcha.jsp i m able to generate image jpeg nd nw i have to create audio captcha.. i m thinking that random string is generated like 3rStAd then when i move my mouse on speaker image it speak "number three lowercase r uppercase S lowercase t uppercase A and finally lowercase d"

one more problem now i m facing... after ur code.. i am able to refresh when i click on to refresh button but when i take my mouse on speaker image then it gives me error and does not play any single sound.. it is working properly when there is no refresh button code is there... the updated code i have already posted...

You have used the ID "captcha" for multiple elements. In order for JavaScript to correctly locate elements using the getElementById function, the query ID must be unique.

As for the audio, the only way to complete that with javascript is to create multiple audio files and get them to be played sequentially. The only problem with that is, an application could be designed to read the JS coding of the audio algorithm in order to circumvent the purpose of using captcha... I would look around on the internet for ways of combining audio files to be sent to the client through the use of server-side code such as PHP. I hope I didn't make this sound too difficult for you...

Okay, that's alright. But the sound isn't necessary, is it? I mean combining sound files using JS isn't exactly reliable because there will have to be multiple sound files loaded and played using timeouts. If you could get the sound files and write down the lengths of each, I'll help you write the code to string it all together.