Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

TUTORIALVaadin lets you build secure, UX-first PWAs entirely in Java.
Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Calling javascript synchronously by Enver Haase, 2 weeks ago
JavaScript intgration problem?
from my connector .js am calling a functio
[b]nfunction test(id) {
document.getElementById(id).oncontextmenu = function(e) {
// e.target is the target of the event or "source element"
alert("subin");
};
}[/b]
connector js as follow
var self;
me_js_test_DraculaTeeth = function() {
// window.alert("we r in js connector class")
var element = $(this.getElement());
self = this;
this.onStateChange = function() {
var data = self.getState();
// window.alert(self.getState());
try {
drawGraphNodes(data);
} catch (err) {
self.onStateChanged();
}
}
this.registerRpc({
refresh : function() {
}
});
}
function drawGraphNodes(data) {
var g = new Graph();
for (var i = 0; i < data._FromList.length; i++) {
g.addEdge(data._FromList[i], data._toList[i], {
directed : true,
stroke : '#bfb',
fill : '#56f',
label : 'sampling'
});
}
var layouter = new Graph.Layout.Spring(g);
layouter.layout();
var renderer = new Graph.Renderer.Raphael('canvas', g, 1300, 600);
renderer.draw();
test("subin");
}
function test(id) {
document.getElementById(id).oncontextmenu = function(e) {
// e.target is the target of the event or "source element"
alert("subin");
};
}[/i][/i]
for mouse click event then the componet itself automaticaly adding repetedly help me to fix this
thanks in advance
Last updated on
You cannot reply to this thread.