<div>I want to create a javascript inside the head section</div>
<div>without doing a callback.</div>
<div> </div>
<div>I tried the following code:</div>
<div> anHtmlRoot javascript add: 'function test() {.....}'</div>
<div> </div>
<div>The problem is, that in this case the javascript will be also encoded and this </div>
<div>breaks my javascript code.</div>
<div> </div>
<div>The only solution i found up to now, is to override the encodeOn: method in WAScriptElement</div>
<div> </div>
<div>encodeOn: aDocument<br> aDocument openTag: self tag attributes: attributes closed: self isClosed.<br> self isClosed ifTrue: [ ^ self ].<br> self childrenDo: [ :each | aDocument nextPutAll: each].<br> aDocument closeTag: self tag</div>
<div> </div>
<div>btw: i am using seaside 2.9</div>
<div> </div>
<div>cheers Gerhard</div>
<div> </div>
<div> </div>