List Info

Thread: Re: Capturing Client Side DOM changes




Re: Capturing Client Side DOM changes
country flaguser name
United States
2007-07-25 09:14:12
Hi Dylan,

"Dylan Browne" <dbrownemango-solutions.com>
wrote on 07/23/2007 10:12:53 
AM:

> In the client browser the user is able to drag and drop
elements within
> the SVG document, which is generated via Batik. 
 
  [...]

> Is there any way to inform the server side of the
client side
> modifications to the DOM.

   The simplest way is to simply serialize the DOM on the
client
(printNode, DOMUtilities.writeNode) and use
'postURL'/XmlHttpRequest(?)
(JS functions) to send it back to the server.  I don't know
what client 
you are using (Batik, ASV, Opera, FF), so I can't provide
real details 
but that should get you started.


------------------------------------------------------------
---------
To unsubscribe, e-mail: batik-users-unsubscribexmlgraphics.apache.org
For additional commands, e-mail: batik-users-helpxmlgraphics.apache.org


RE: Capturing Client Side DOM changes
country flaguser name
United Kingdom
2007-07-25 09:44:47
Good to hear that, as that is the road I have started down,
hoped it was
the correct method.

Will post back with any useful snippets for future
reference.

Thanks as ever,
Dylan


-----Original Message-----
From: thomas.deweesekodak.com [mailto:thomas.deweesekodak.com] 
Sent: 25 July 2007 15:14
To: batik-usersxmlgraphics.apache.org
Cc: batik-usersxmlgraphics.apache.org
Subject: Re: Capturing Client Side DOM changes

Hi Dylan,

"Dylan Browne" <dbrownemango-solutions.com>
wrote on 07/23/2007
10:12:53 
AM:

> In the client browser the user is able to drag and drop
elements
within
> the SVG document, which is generated via Batik. 
 
  [...]

> Is there any way to inform the server side of the
client side
> modifications to the DOM.

   The simplest way is to simply serialize the DOM on the
client
(printNode, DOMUtilities.writeNode) and use
'postURL'/XmlHttpRequest(?)
(JS functions) to send it back to the server.  I don't know
what client 
you are using (Batik, ASV, Opera, FF), so I can't provide
real details 
but that should get you started.


------------------------------------------------------------
---------
To unsubscribe, e-mail: batik-users-unsubscribexmlgraphics.apache.org
For additional commands, e-mail: batik-users-helpxmlgraphics.apache.org


------------------------------------------------------------
---------
To unsubscribe, e-mail: batik-users-unsubscribexmlgraphics.apache.org
For additional commands, e-mail: batik-users-helpxmlgraphics.apache.org


RE: Capturing Client Side DOM changes
country flaguser name
United Kingdom
2007-08-01 07:44:40
Hi,

A bit of extra advice gratefully received....

I've got my DOM serialized and posted back to the server,
I'm now trying
to update my initial SVG doc with the new DOM (or create a
new doc)..

So my initial SVGDocument is something like....

<?xml-stylesheet type="text/css" href="http://blah/blah.css&
quot;?>
<?xml-stylesheet type="text/css" href="http://blah/blah.css&
quot;?>
<svg contentScriptType="text/ecmascript.... etc
etc>
<old stuff />
</svg>

And my new Node to overwrite the previous is...

<svg contentScriptType="text/ecmascript.... etc
etc>
<new stuff />
</svg>

And I thought I could call something like..

doc.replaceChild(oldDocNode, newDocNode);
or
doc.importNode(newNode, true);

But I'm getting various errors with the various combinations
of
parameters/methods I'm trying. I guess what I am trying to
do is very
simple, and I can't see the wood for the trees...

Any tips greatly appreciated,

Dylan.
		



------------------------------------------------------------
---------
To unsubscribe, e-mail: batik-users-unsubscribexmlgraphics.apache.org
For additional commands, e-mail: batik-users-helpxmlgraphics.apache.org


[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )