image not refreshing after ajax call(Firefox,opera)
Hi,
I stuck with issue that image is dynamically changes via ajax on shape using setFillPattern(With same filename and location) function but in firefox and safari i it wont change.
Please find below code,
$( "#topcolor" ).change(function() {
$.ajax({
type: "POST",
url: "pngcolor.php",
data: { color: $(this).val(),id: "topcolor"},
})
.done(function( msg ) {
try {
var topImg = new Image();
topImg.src = "tempimage/topbar.jpeg";
topImg.onload = function() {
triangle.setFillPatternImage(topImg);
layer.draw(topImg,true);
};
} catch(err) {
console.log(err);
console.trace();
}
});
});
I'm using linux ubuntu 12.04 and Firefox 25.0. and kinatic js 4.7.4.
Thanks in advance.
Tested with latest version: http://jsfiddle.net/lavrton/Vm52D/ Woks fine everywhere. Can you make a fiddle example?
can you repost this on stackoverflow, with a jsfiddle? for implementation questions, stack overflow is a much better forum than github. Also, I noticed that you're passing arguments to the draw() method. The draw method takes no arguments.
https://github.com/ericdrowell/KineticJS/blob/master/src/Node.js#L1465
Hi Eric,
Thanks for your time and consideration.
But it wont work on JSfiddle because it use PHP script for generating coloured png file each time drop-downs changes their value via ajax request.
So i send you zip file you just extract it on php server(GD library enabled) and check this for all the the browser chrome and safari works (May be they use webkit) and firefox ,opera and IE isn't give any error either but still it wont work.
-Naitik
On 2014-01-20 12:43, Eric Rowell wrote:
can you repost this on stackoverflow, with a jsfiddle? for implementation questions, stack overflow is a much better forum than github. Also, I noticed that you're passing arguments to the draw() method. The draw method takes no arguments.
https://github.com/ericdrowell/KineticJS/blob/master/src/Node.js#L1465 [1]
Reply to this email directly or view it on GitHub [2].
Links:
[1] https://github.com/ericdrowell/KineticJS/blob/master/src/Node.js#L1465 [2] https://github.com/ericdrowell/KineticJS/issues/766#issuecomment-32785621
Hi Eric,
Please open attache URL given below in Chrome as well as Firefox you get better idea of problem.
http://ringinghost.com/shutter/
In Firefox image changes only once(First time) when changing value of first drop down and work fine in chrome.
-Naitik