What steps will reproduce the problem?
1. I am not able to load Jcrop in FF, however it loads on IE and Chrome
2.
3.
What is the expected output? What do you see instead?
It should work on Firefox.
What version of the product are you using? On what operating system?
Windows 7, IE-9, FF-26
Jcrop-0.9.12
Please provide any additional information below.
The JS code:
var jcrop_api;
$(window).load(function(e) {
var $ = jQuery;
var varSwatch_X1 = '<xsl:value-of select="$attributes[@AttributeID=$SWATCH_X]" />';
var varSwatch_Y1 = '<xsl:value-of select="$attributes[@AttributeID=$SWATCH_Y]" />';
var varSwatch_X2 = +varSwatch_X1+ +<xsl:value-of select="$DEFAULT_SWATCH_W"/>;
var varSwatch_Y2 = +varSwatch_Y1+ +<xsl:value-of select="$DEFAULT_SWATCH_H"/>;
jcrop_api = $.Jcrop('#jcrop_target');
$('#jcrop_target').Jcrop({
onChange: showCoords,
onSelect: showCoords
});
jcrop_api.setSelect([varSwatch_X1,varSwatch_Y1,varSwatch_X2,varSwatch_Y2]);
jcrop_api.setOptions({ allowResize: false });
jcrop_api.setOptions({ allowSelect: false });
jcrop_api.focus();
//callback handler for form submit
$("#ajaxform").submit(function()
{ debugger;
$.ajax({
type: "POST",
url: "../products/SKU.9842/values/Swatch_X",
contentType: "text/plain",
data: "{'value':'" + $('#Swatch_X').val()+ "'}",
success: function (result) {
alert();
}
});
});
if(e.preventDefault){ e.preventDefault()}
else{e.stop()};
e.returnValue = false;
e.stopPropagation();
return false;
});
function showCoords(c)
{
$('#Swatch_X').val(c.x);
$('#Swatch_Y').val(c.y);
};
Original issue reported on code.google.com by sai.jagd...@gmail.com on 13 Jan 2014 at 3:42
Original issue reported on code.google.com by
sai.jagd...@gmail.com
on 13 Jan 2014 at 3:42