Adnan
Adnan

Reputation: 4607

Calling Java script from java using DWR not updating input field in browser

I am calling java script from java using the DWR mechanism with below code

Container container = ServerContextFactory.get().getContainer();
ScriptSessionManager manager = (ScriptSessionManager) container.getBean(ScriptSessionManager.class);
Collection sessions = manager.getAllScriptSessions();
Util utilAll = new Util(sessions);
utilAll.setStyle("isTreeUpdatedButton", "background-color", "#33C");

It is executing successfully but the input field's background(element having id isTreeUpdatedButton) color is not updating, and an alert comes saying "invalid assignment left-hand side" when above code is executed.

Upvotes: 0

Views: 169

Answers (1)

roccolocko
roccolocko

Reputation: 594

The problem is on your JavaScript function (Which you should post). The error says that the left side of an operation is wrong. It could be that you are using an operator in the wrong way of using a function that does not return the expetected value for the assigment: For example:

var x;
x = "foo" += "test";

That is just an example because it can be many things.

Upvotes: 0

Related Questions