Update SVG file using Ajax, by retrieving some information from a Java Servlet -


I have written a Java sublate that retrieves a SVG image. The content type for this servlet is CONTENT_TYPE = "image / svg + xml";

It is being integrated into a large (ADF-11G) application form of a fixed inletframe if you are accustomed to JSP, the code should be familiar:

  & lt; Af: inlineFrame source = "servlet? Filename = testsvg1 and width = 1024 & height = 1024" inline style = "width: # {session.graphSVGWidth} px; height: # {session.graphSVGHeight} px; : None "& gt; & Lt; / AF: inlineFrame & gt;  

This SVG has a dynamack popup that allows the user to interact with "image", which sends information to the server via Ajax calls.

For example it is a part of JavaScript that is being used by SVG:

  function loadXMLDocPOST (Parameters) {var xmlhttp = getXmlHttp (); Xmlhttp.open ("post", 'servlet', true); Xmlhttp.setRequestHeader ("content-type", "app / x-www-form-urxed"); Xmlhttp.setRequestHeader ("Content-Length", Parameters Lamp); Xmlhttp.setRequestHeader ("Connection", "Closed"); Xmlhttp.onreadystatechange = function () {if (xmlhttp.readystate == 4 and xmlhttp.status == 200} {/ * Do something here} // {//alert('xmlhttp.status_r2= '+ xmlhttp status ); }} Xmlhttp.send (params); } Edit Action Actions (filename, name) {loadXMLDocPOST (...)}  

Ajax call is successful, but the problem is that when I trigger some actions from SVG Update the image in the inline frame ( / * do something here * / ) then, how do I re-provide SVG from within SVG? The problem is that innerHTML is not working in SVG document.write () is not working either, do you have any suggestions?

You can use parent. XXX includes the HTML document, which includes SVG, to use global variables and functions.

In this way, STVG can contact its inherent HTML document.

For example:

  Parents Document.write ()  

Works in svg!


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -