I am trying to use this with our Captcha System, it works when the
page if first loaded, however, if they enter the code wrong, AJAX
updates the page without it fully reloading, giving them a new image,
field and sound file, so I tried to make it work and it fails with a
javascript object expected error now.
Here is my code:
Perl:
<span id="playGotcha" style="display: none;">
<a href="javascript:void(0)"
onclick="document.getElementById('playGotcha').style.display='none';">Close
MP3 Player</a><br>
<script type="text/javascript" src="/css/js/audio/swfobject.js"></
script>
<div id="flashPlayer"> </div>
<script type="text/javascript">
function $_functionName() {
var so = new SWFObject("/css/js/audio/playerSingle.swf",
"$_functionName2", "192", "67", "7", "#FFFFFF");
so.addVariable("autoPlay", "yes");
so.addVariable("soundPath", "/images/sounds/$tur->{audio_src}");
so.write("flashPlayer");
alert('file loc: /images/sounds/$tur->{audio_src}');
return true;
}
</script>
</span>
<p><br />
<font color="#FFFFFF">$_lang{site_impaired_hidden_message1} <a
href="javascript:void(0)"
onclick="document.getElementById('playGotcha').style.display='inline',
$_functionName();"><font color="#FFFFFF">$_lang{click_here}</font></a>
$_lang{site_impaired_hidden_message2}</font>
$_functionName contains a unique code for each captcha image that I
made to have in the link so it will not run that javascript until the
link is loaded. That worked fine on the first page load until I
changed the second field where $_functionName2 is, that was mymovie,
and I made $_functionName2 $_functionName with an extra letter behind
it to make it also unique, now it fails too.
I do know for sure that ajax is working and giving updated code to the
browser, but it is like once the page loads, then the reloaded code is
no good or not recognizable by the browser.
Any ideas?
thank you,
Richard
--
You received this message because you are subscribed to the Google Groups
"SWFObject" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/swfobject?hl=en.