Hi Gissur,
Here is a suggestion that may help:
Let's assume you have a "layer" or group of elements that you want
to send to the server. If you convert the elements to XML strings,
you may have to make a few minor adjustments so XML will not crash,
but it should work just dandy. (i.e. XML does not like xlink:href,
so you have to do a regular expression to change it for XML
transmission)
sendXML=svgString //---these are your elements as valid XML strings
var xmlFile = new ActiveXObject("Microsoft.XMLHTTP");
xmlFile.Open("POST", "saveToFile.asp", false);
xmlFile.Send(sendXML);
saveToFile.asp:
<OBJECT id="saveXML" progid="Msxml2.DOMDocument"
runat="Server"></OBJECT>
<%@ Language=jScript %>
<%
Response.Expires=-1000
saveXML.load(Request)
//--you now have a valid XML document at the server to do whatever
is needed to save/edit to an SVG file---
%>
The saveToFile.asp could save the xml elements at the server in an
XML file, or write a valid SVG document as a text file with .svg
extension.
Francis
-- In [email protected], Gissur Þórhallsson
<[EMAIL PROTECTED]> wrote:
> Hi guys
>
>
>
> I'm working with SVG(with ECMA-script)- in an ASP page my problem
is this: I created a web-service using Batik which rasterizes SVG
files for me. All I supply it with is an URL to the SVG file and an
URL for the page that needs the rasterized file. No problems on that
end.
>
>
>
> My problem is that I have a webpage displaying an SVG graphic
which the user can edit. I want the user to be able to press a
button that will ship the displayed SVG off to my Rasterizer where I
work my magic and send the output to points forward. Not a big deal.
What I can't figure out is how I can get a snapshop of the SVG file
the user is editing to a file on the server.
>
>
>
> I've tried running around with the postURL and getURL methods -
but I can't seem to make them work(I get success - but I don't think
I understand exacly what is going on - maybe some pointers on that
would help) - also my run-ins with ActiveX have left me less than
impressed.
>
>
>
> At the moment I'm just looking for something that works on MSIE
(ALL my users run MSIE) also I'm not at all afraid of the potential
compatibility of using the ASV-specific API.
>
> ________________________________________________________________
> Kær Kveðja / Best Regards,
>
> Gissur Þórhallsson <mailto:[EMAIL PROTECTED]> · B.Sc
> Hugbúnaðarsérfræðingur · Software Consultant
> Sími/Direct: +354 540 2500 · Fax: +354 562 2819
> www.loftmyndir.is <http://www.loftmyndir.is/>
>
>
>
>
>
> [Non-text portions of this message have been removed]
------------------------ Yahoo! Groups Sponsor --------------------~-->
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/1U_rlB/TM
--------------------------------------------------------------------~->
-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my
membership"
----
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/