Wednesday, February 27, 2008

javascript is dirty

today a colleague tried to execute javascript with placeholders for a wicket component, no matter if it is rendered in response to an ajax request or in response to a normal request.

one possibility would be to append the javascript to the component markup. this way it would be executed whenever the component is rendered. but what about the placeholders in that script? he said, he could use wicket label components in the javascript that does not render its tag (e.g. a span) but only its body.

after all javascript would be a dirty language anyway (e.g. because of browser incompability), so why not try this dirty approach.

No comments: