Page 1 of 1

[SOLVED] DebugBar Script error ie6

Posted: Mon May 26, 2008 6:05 am
by thosecars82
Hello there
I do not know why when I browser http://www.metatradersoftware.com in the contact section I get this debtgubar error. However, I only get the error in ei6 and not in firefox. I know the problem is in the code of the recaptcha for hidding the email because when I remove it, then I do not get the error any more. The error appears on a window in ie6 which says:
DebugBar: Script Error
Line: 64
Character: 13
Code: 0
Error Message: Invalid character
URL: http://www.metatradersoftware.com/conta ... 41ebf8f53f
The code which I think is the culprit is:

<?php
...
echo "meta<a href='http://mailhide.recaptcha.net/d?k=01UN5 ... Eh_oxQ6lc='";
echo "onclick = 'window.open(\'http://mailhide.recaptcha.net/d?k=01UN5 ... GqTVN-iSk8";
echo "Dxug7cyESSfC-y-jo1w6vEh_oxQ6lc=\', \'\', \'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,";
echo "height=300') return false; title='";
echo _("Reveal this e-mail address");
echo "'>..................................................................</a>@gmail.com";
...
?>
Do you have any idea?
Thanks in advance

Re: DebugBar Script error ie6

Posted: Mon May 26, 2008 9:33 am
by thosecars82
when you single-quote a Javascript function call, you must double-quote the parameters, and vice-versa e.g.:
echo "onclick = 'window.open(\"http://www.phpfreaks.com\", \"\", \"toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=300\") return false;'";