VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: adventure1 on May 28, 2013, 19:20:48 PM

Title: The problem with the popup window to ask a question
Post by: adventure1 on May 28, 2013, 19:20:48 PM
I use J2.5.9 and VM2.0.20b.

I have two problems with popup to ask a question in the product details.

1. As I press the button to ask a question popup window displays properly, but I have a javascript error:

<script language="javascript">
window.addEvent ('domready', function () {
addCP ();
});
</ script>

<script language="javascript">
addCP function ()
{
var html = document.getElementById ("askform"). innerHTML;
document.getElementById ("askform"). innerHTML = html + '<input type='hidden' name='cp' value='1'> ";
}
</ script>

I do not know where to look for the Script. Please indicate where to look.

2. Despite the javascript error when you complete all the fields in this form, and I want to send it in this form, there is another error that: enable JavaScript in your browser. But in IE and FF have JavaScript enabled.
Why is this happening?
Title: Re: The problem with the popup window to ask a question
Post by: PRO on May 28, 2013, 19:47:30 PM
adventure1,

thats not standard vmart JS for the ask question,

are you using a commercial template?

if so, they can fix this
Title: Re: The problem with the popup window to ask a question
Post by: adventure1 on May 28, 2013, 19:56:14 PM
Hi PRO

I using my template.

This is my website: www.swiataloesu.pl

Can you help me where can I find these errors?
Title: Re: The problem with the popup window to ask a question
Post by: PRO on May 28, 2013, 23:53:36 PM
you have javascript conflicts

between your menu   and virtuemart scripts

I think its the menu

Title: Re: The problem with the popup window to ask a question
Post by: adventure1 on May 29, 2013, 03:02:13 AM
PRO thank you for your help.

Problem SOLVED

The problem was in plugin Virtuemart Anti Spam Captcha (... /plugins/system/vm_anty_spam/vm_anty_spam.php) in line about 83:
turned off the script for mootools:

if (file_exists (JPATH_BASE. '/ components / com_virtuemart / virtuemart_parser.php'))
/ * {
/ / Vm 1 - mootools
$ body_new = str_replace ('</ head>', '
<script language="javascript">
window.addEvent (\ 'domready \', function () {
addCP ();
});
</ script>
</ head> ', $ body_new);
}
else * /

:)