I have a web application in Vaadin 7, I use JavaScript and it works on Google Chrome, but doesn't on IE 11. This is my way of to use JavaScript (I don't want doing it with Java if it's possible)
com.vaadin.ui.JavaScript.getCurrent().addFunction("left", new JavaScriptFunction(){
private static final long serialVersionUID = 1L;
@Override
public void call(JsonArray arguments) {
zinkonaux.executeJs(""
+ "var box = document.querySelector('.divobjetos');"
+ "var pos = window.getComputedStyle(box,null).getPropertyValue('left');"
+ "pos = parseInt(pos);"
+ "pos = pos + 300;"
+ "box.style.left = pos+'px';"
);
}
});
My problem is: In IE the javascript function does not work, I want to click on one of the previous div, another scroll, like a carousel effect, but in IE when clicking does not make the effect and in the development window there are no errors
I could not solve the JavaScript error in IE, specifically to change the position of the inner div between the left and right containers, use in each one a button that in its ClickListener modified the style with:
Styles styles = Page.getCurrent().getStyles();
styles.add(".divscroll .divobjects { left: "+positionInfoTags+"px !important }");
My html code was this:
<div class="container">
<div class="left" location="moveLeft"></div>
<div class="right" location="moveRight"></div>
<div class="divscroll">
<div class="divobjects" location="infoTags">
</div>
</div>
</div>