You need to put the script tag inside wng:head tag and not in the wng:body tag.
Fanta
On 1 Jul 2009, at 22:51, neeraj_mait wrote:
Hi folks,
I am trying to embed javascript in wng tags based mobile web page.
I tried with the following code:
<wng:script type="text/javascript">
document.write("This is my first JavaScript!" );
</wng:script>
I get this error:
System The following command exception has occurred during processing: "javax.servlet.jsp.JspException : Can't nest net.sourceforge. wurfl.wng. component. Script Component into net.sourceforge. wurfl.wng. component. Body".
What is the correct way to use javascript with wng?
Does anyone have any sample code?
Thanks
Neeraj