I generate a svg with batik 1.5 and I stream it using this part of code:
 
try {

Writer out  = new OutputStreamWriter(response.getOutputStream(), "iso-8859-1");

calendrerForm.getSvg1().stream(out,false);

}

catch(Exception e){

e.printStackTrace();

}finally{

out.close();

response.getOutputStream().flush();

response.getOutputStream().close();

}

and I display it using :

<EMBED SRC="/server/CalenderSelection.do?Action="">

width="<%=form.getPageWith()%>" height="<%=form.getPageHeight()%>"

TYPE="image/svg+xml">

</EMBED>

Everything is working well (even hyperlink to other pages) except the _javascript_ that i put in it. When i write this svg on disk and open it using:

<EMBED SRC="/server/svg0.svg"

width="<%=form.getPageWith()%>" height="<%=form.getPageHeight()%>"

TYPE="image/svg+xml">

</EMBED>

Everything is working well, even the _javascript_!!!

<script type="text/_javascript_">
      <![CDATA[var popupObj = window.createPopup();var oPopupBody = popupObj.document.body;function popMeUp(x, y,texte){oPopupBody.style.border = "1px black solid";oPopupBody.style.backgroundColor="yellow";oPopupBody.innerHTML = texte;popupObj.show(x, y, 100, 35);}function hideMeDown(){popupObj.hide();}]]>
    </script>

Someone has a solution ?

thanks

ben



Post your free ad now! Yahoo! Canada Personals

Reply via email to