VM 1.1.6 rev 2605
Alternative image mouse-over doesn't work in VM description, it works in Joomla content, see video http://www.protechsystems.us/stuff/joomla/vm/alternative-image.htm
This is because JavaScript is removed by default from product description. In ps_product::add and ps_product::update you have:
$fields = array ( 'vendor_id' => $vendor_id,
'product_sku' => vmGet($d,'product_sku'),
'product_name' => vmGet($d,'product_name'),
'product_desc' => vmRequest::getVar('product_desc', '', 'default', '', VMREQUEST_ALLOWHTML),
'product_s_desc' => vmRequest::getVar('product_s_desc', '', 'default', '', VMREQUEST_ALLOWHTML),
...
The mask "VMREQUEST_ALLOWHTML" strips anything except from HTML. If you change that into "VMREQUEST_ALLOWRAW" you will have your "onmouseover" effect.
So this behaviour is "by design", and not a bug. Should we change it? After all, if Joomla content allows this kind of JavaScript, why shouldn't we do that in product description?
I'd like to have other opinions.
Since no one has replied, I say lets add it.
If it's all the same for you i'd like to have some more opinions. I'll ask that in the chat.
Sure, the more input the better.
I was trying to add JavaScript to VM descriptions and ran into the same problem, but I was doing it to set up some Google Optimizer tests. It would be helpful to me if it didn't strip out the JavaScript.
One more note here... I used your method above so that I could put the Optimizer javascript into the description like I need. That worked like a charm - thanks!
But, I then noticed that the javascript code also ended up in my Meta Description on the final webpage, which of course is not really the description I'd want showing up anywhere.
Thanks! This has been very helpful.