Mouseover not working on image_tag - onmouseover

I want to show a different image on the mouse over event.
This is the code I have (haml):
= image_tag(product.photos.first.asset.thumb.url, :onMouseover=> "this.src=product.photos.second.asset.thumb.url'", :onMouseout=> "this.src=product.photos.first.asset.thumb.url'")
but I keep getting "Uncaught SyntaxError: Unexpected token ILLEGAL" on that line.
Any suggestions of what am I doing wrong? thanks!

This was the solution:
= image_tag(product.photos.first.asset.thumb.url, :onMouseover=> "this.src='#{product.photos.second.asset.thumb.url}'", :onMouseout=> "this.src='#{product.photos.first.asset.thumb.url}'")

Related

AttributeError: 'Tensor' object has no attribute 'close'

this is the code I am working with:
I searched for a similiar error do i need to change the .close() ?
Can anyone help please?
You should remove the close() function call on the parameter tensor image in line -
image = tensor.cpu().close().detach().numpy(). This should be replaced with - image = tensor.cpu().detach().numpy()

Check the render method of `DrawerViewBase`

i try create side navBar and i get error:
My code:
This is the error i get

In pentaho , Map component popup do not display the value after a refresh

I used map markers with parameter, First the marker and popup works fine.
And when I change the parameter, markers refreshed ok but, popup with data shows nothing.
I tried to solve, but nothing works. Kindly asking help
Marker Click function test JS:
function f(){
alert(this.dashboard.getParameterValue("status") +" you have clicked on");
//Dashboards.fireChange('status', e.vars.category.value);
}
Then you have to change the param values, check the alert box.
In the marker click function you have to write the alert function first.

bootstrap show.bs.modal event won't fire

I have a problem with my modal events. None of them I tested worked.
I'm using Bootstrap 3.3.6 and I tested my code in a jsfiddle and everything is working well there.
Here's my js :
$('#delete').on('show.bs.modal', function(e) {
var title = $(e.relatedTarget).data('title');
var id = $(e.relatedTarget).data('id');
document.getElementById('id').value = id;
document.getElementById('title').innerHTML = title;
});
I have no errors in my console, the modal shows up but the event isn't fired. I've tried show, shown and loaded.
Thank you for your help
Before asking this question, I haven't tested the .modal('show) method.
I got an error and after few checkups it's because I had two different versions of Jquery.
Problem solved after removing one.

Fsockopen error handling, at the moment I get warnings and page stops further content from loading

I have the following code:
$open_socket = fsockopen($host,$port,$errno,$errstr,30);
if(!$open_socket){
echo "$errstr ($errno)<br />".$nl;
}else{
fputs($open_socket,$xml);
while(!feof($open_socket)){
$line = fgets($open_socket,128);
$return_xml.= $line;
}
fclose($open_socket);
}
but if there is not connection I get the following message:
Warning: fsocket ......
the rest of the page is blank, basically how can I handle this where my page will continue and things will be displayed and just the error message is displayed and not the warning.
Thanks
You can supress warnings calling fsockopen
$open_socket = #fsockopen($host,$port,$errno,$errstr,30);