We are using Curvy corners script (http://www.curvycorners.net) for the JSF buttons to have the curvy corners in IE.
In IE when we make a Ajax call ,in Ajax response this curvy corners doesn’t executed so we tried to re-execute the curvy corner script . as below in JSF ,but still the curvy corner is not refreshed ,how to reload the curvy corner in Ajax response
jsf.ajax.addOnEvent( function(data) {
if (data.status == "success") { // Can be 'begin', 'complete' and 'success'.
alert("curvy corner");
var settings = {
tl: { radius: 5 }, tr: { radius: 5 }, bl: { radius: 5 }, br: { radius: 5 }, antiAlias: true
};
$.getScript("jquery.curvycorners.min.js", function() {
curvyCorners(settings, '.button-primary'); });
}
From the comments:
Then the location which you specified in
$.getScript()is just invalid. As you have specified it now (without a leading slash), it’s relative to the current request URL. Imagine that you have opened the JSF page by http://localhost:8080/context/some/folder/some.xhtml, then the$.getScript("jquery.curvycorners.min.js")will try to load it from http://localhost:8080/context/some/folder/jquery.curvycorners.min.js. Your problem indicates that the file is actually not there at all, but on a different folder or something.The callback function of
$.getScript()is only called when the script is successfully loaded. So you need to fix the location accordingly so that it get loaded properly.But as you mentioned in the comments, you have this script already in the
<head>and it is already working on page load. You don’t need to load the whole script again by$.getScript()at all. Just invoke the callback function directly.