Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

svg-developers · SVG Developers

The Yahoo! Groups Product Blog

Check it out!

Group Information

  • Members: 8775
  • Category: Data Formats
  • Founded: Aug 16, 1999
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Messages

Advanced
Messages Help
Messages 56176 - 56206 of 66120   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#56176 From: Sean <scene@...>
Date: Wed Jun 28, 2006 7:01 pm
Subject: Re: getURL/XMLHTTP
couloir007
Send Email Send Email
 
This appears to be a an issue harder to solve than I thought it would
be. Below is my javascript code that for the most part works, except for
one thing, the Adobe viewer won't let me call getURL, parse it with
parseXML, and then insert into an svg doc that is not the calling
document. I get:

---------------------------
Script error
---------------------------
Wrong document
line: 22, column: 16

Any thoughts on how to get around this would be very much appreciated.

// JavaScript Document
function addMenu(evt){
     myUrlString = ("F4-Test.php?&menu=Planning");
     getURL(myUrlString,addMenu2);
}

function addMenu2(data) {
//     alert(data.content);
     if(data.success) {
         var node = parseXML(data.content, document);
         var xml = node.firstChild;
         var id = xml.getAttribute('id');
         var myMenuToAdd;
         child = node.firstChild.firstChild;
         while(child != null){
             // get sibling BEFORE parent changes
             childSibling = child.nextSibling;
             if(child.nodeType==1){
//                 alert(window.printNode(child));
                 myMenuToAdd =
parent.document.F4B.getSVGDocument().getElementById("PlanningCanvas");
                 myMenuToAdd.appendChild(child);
             }
             child = childSibling;
         }
     }else {
         alert("something went wrong!");
     }
}

#56177 From: "Richard Pearman" <richard@...>
Date: Wed Jun 28, 2006 7:53 pm
Subject: Trouble with hosting company (a bit off topic)
cremnosedum
Send Email Send Email
 
Hi,

I'm posting this here because I've never heard of anybody having this sort
of trouble before and want to know if it's at all unusual and what can be
done about it.

My old hosting company, Elosoft (aka Nextwebhosting) won't set document
encoding for SVGZ files so Firefox can't display them on my site.  When I
tried to point this out to them they acted like they were incapable of
reading the words "document encoding" or any sentences which contained them.

I'm trying to move to another hosting company.  When I didn't respond to
Elosoft's request for payment for another years service, they sent me an
email claiming to have received payment from my credit card.  Upon
investigation, I discovered that this payment hadn't been processed so I
stopped it.  However Elosoft haven't stopped hosting my site and are thus
preventing anybody from accessing the version on my new host.  Elosoft claim
that the contract (meaning their website, or at least parts of it) say that
I need to give them 30 days notice of cancelation.  I think the wording in
ambiguous and I also suspect it has changed since I pointed this out to
them.

Anyway, is this sort of thing at all unusual?  How do other people deal with
it?  Can I get the internet to acnowledge my new hosting company without
Elosoft's cooperation?  Anybody else had problems with Elosoft?

Richard Pearman       http://www.pixelpalaces.com/
The next stage in the evolution of web comics:
http://www.onlinecomics.net/pages/details/listing.php?comicID=4415

#56178 From: "Peter Kalev" <peterk@...>
Date: Wed Jun 28, 2006 8:16 pm
Subject: RE: getURL/XMLHTTP
peterkalev2002
Send Email Send Email
 
Actually the calling document does not matter, BUT the document
associated with the parseXML does...



In many cases I use AJAX to get an svg segment and then I just use one
of the svg's on my html page to parse the returned text into XML and
then use it...



   _____

From: svg-developers@yahoogroups.com
[mailto:svg-developers@yahoogroups.com] On Behalf Of Sean
Sent: Wednesday, June 28, 2006 12:01 PM
To: svg-developers@yahoogroups.com
Subject: Re: [svg-developers] getURL/XMLHTTP



This appears to be a an issue harder to solve than I thought it would
be. Below is my javascript code that for the most part works, except for

one thing, the Adobe viewer won't let me call getURL, parse it with
parseXML, and then insert into an svg doc that is not the calling
document. I get:

---------------------------
Script error
---------------------------
Wrong document
line: 22, column: 16

Any thoughts on how to get around this would be very much appreciated.

// JavaScript Document
function addMenu(evt){
myUrlString = ("F4-Test.php?&menu=Planning");
getURL(myUrlString,addMenu2);
}

function addMenu2(data) {
// alert(data.content);
if(data.success) {
var node = parseXML(data.content, document);
var xml = node.firstChild;
var id = xml.getAttribute('id');
var myMenuToAdd;
child = node.firstChild.firstChild;
while(child != null){
// get sibling BEFORE parent changes
childSibling = child.nextSibling;
if(child.nodeType==1){
// alert(window.printNode(child));
myMenuToAdd =
parent.document.F4B.getSVGDocument().getElementById("PlanningCanvas");
myMenuToAdd.appendChild(child);
}
child = childSibling;
}
}else {
alert("something went wrong!");
}
}





[Non-text portions of this message have been removed]

#56179 From: "GTTR" <jagaru58@...>
Date: Wed Jun 28, 2006 8:24 pm
Subject: Re: Is there any easy way to create an inset from the path?
GTTR
Send Email Send Email
 
Thank you for your help.  I have tried to use the transform="scale
(0.5)", but it doesn't give the results that I am looking for.  I
need to somehow inset it within the current path data using the
current coordinate system.  I know it is possible to do using some
type of transform matrix because Inkscape has an inset/offset
function in it, but I am just not sure of the math or possibly not
sure if there is something else that can be used with the scale
transform.

I guess in a sense, I need to take each point within the path data,
do some type of calculation that will inset it in a certain
amount.

--- In svg-developers@yahoogroups.com, "pavoturkey" <pavoturkey@...>
wrote:
>
> Try using <defs> and the <use> tags. Define a <def> of your ellipse
> path and then you can call this defined ellipse any number of
times by
> issuing the <use> tag 'n' amount of times.
>
> Here is sample code for how to do this:
>
> <svg>
>
>   <!-- Define the ellipse path and give it an id attribute -->
>   <defs>
>     <path id="ellipse" fill="none" stroke="#000000" stroke-
width="0.3"
>  d="M90.149,126.15c49.705,0,90-28.207,90-63s-40.295-63-90-63
>  c-49.703,0-90,28.207-90,63S40.447,126.15,90.149,126.15z"/>
>   </defs>
>
>   <!-- Call the defined ellipse path into action -->
>   <use x="10" y="10" xlink:href="#ellipse" />
>
>   <!-- This calls the ellipse path and applies a transform to
create
> an inset version of the path -->
>   <use x="10" y="300" xlink:href="#ellipse" transform="scale
(0.5)"/>
>
> </svg>
>
> --- In svg-developers@yahoogroups.com, "GTTR" <jagaru58@> wrote:
> >
> > I was wondering if anyone can point me to how I could create an
inset
> > version of a path that is already defined.  For example if I
have the
> > following path, which is a ellipse, I would like to have this
same
> > path displayed but also have an inset version of it displayed.
Sort
> > of like creating inset borders:
> >
> > <path fill="none" stroke="#000000" stroke-width="0.3"
> > d="M90.149,126.15c49.705,0,90-28.207,90-63s-40.295-63-90-63
> >  c-49.703,0-90,28.207-90,63S40.447,126.15,90.149,126.15z"/>
> >
> > Thanks for taking the time to assist and any help will be
appreciated.
> >
> > Thanks
> >
>

#56181 From: "pavoturkey" <pavoturkey@...>
Date: Wed Jun 28, 2006 9:18 pm
Subject: Re: Is there any easy way to create an inset from the path?
pavoturkey
Send Email Send Email
 
You can do more than just a scale transformation
Try this out, I added in a translation call to the transform to
produce a more desirable output along what maybe you are looking for.
I added the method call "translate(x y)" to the transform. The
translate call moves the ellipse to where I want it to display, and
the scale call sizes the ellipse for me. So you can essentially
position and size your ellipse however you want it on your svg
document. I decided to create multiple inset versions of the ellipse
for you just for fun.

<svg>

<!-- Define the ellipse path and give it an id attribute -->
<defs>
<path id="ellipse" fill="none" stroke="#000000" stroke-width="0.3"
d="M90.149,126.15c49.705,0,90-28.207,90-63s-40.295-63-90-63
c-49.703,0-90,28.207-90,63S40.447,126.15,90.149,126.15z"/>
</defs>

<!-- Call the defined ellipse path into action -->
<use x="10" y="10" xlink:href="#ellipse" />

<!-- This calls the ellipse path and applies a transform to create
an inset version of the path -->
<use x="10" y="10" xlink:href="#ellipse" transform="translate(10 7)
scale(0.9)"/>
<use x="10" y="10" xlink:href="#ellipse" transform="translate(20 14)
scale(0.8)"/>
<use x="10" y="10" xlink:href="#ellipse" transform="translate(30 21)
scale(0.7)"/>
<use x="10" y="10" xlink:href="#ellipse" transform="translate(40 28)
scale(0.6)"/>
<use x="10" y="10" xlink:href="#ellipse" transform="translate(50 35)
scale(0.5)"/>
<use x="10" y="10" xlink:href="#ellipse" transform="translate(60 42)
scale(0.4)"/>
<use x="10" y="10" xlink:href="#ellipse" transform="translate(70 49)
scale(0.3)"/>
<use x="10" y="10" xlink:href="#ellipse" transform="translate(80 56)
scale(0.2)"/>
<use x="10" y="10" xlink:href="#ellipse" transform="translate(90 63)
scale(0.1)"/>
</svg>


This is an update from the previous code sample, notice I am supplying
a different transform expression, "translate(x y) scale(x)". Here I
am translating the path and also scaling it to produce the affect I want.

--- In svg-developers@yahoogroups.com, "GTTR" <jagaru58@...> wrote:
>
> Thank you for your help.  I have tried to use the transform="scale
> (0.5)", but it doesn't give the results that I am looking for.  I
> need to somehow inset it within the current path data using the
> current coordinate system.  I know it is possible to do using some
> type of transform matrix because Inkscape has an inset/offset
> function in it, but I am just not sure of the math or possibly not
> sure if there is something else that can be used with the scale
> transform.
>
> I guess in a sense, I need to take each point within the path data,
> do some type of calculation that will inset it in a certain
> amount.
>
> --- In svg-developers@yahoogroups.com, "pavoturkey" <pavoturkey@>
> wrote:
> >
> > Try using <defs> and the <use> tags. Define a <def> of your ellipse
> > path and then you can call this defined ellipse any number of
> times by
> > issuing the <use> tag 'n' amount of times.
> >
> > Here is sample code for how to do this:
> >
> > <svg>
> >
> >   <!-- Define the ellipse path and give it an id attribute -->
> >   <defs>
> >     <path id="ellipse" fill="none" stroke="#000000" stroke-
> width="0.3"
> >  d="M90.149,126.15c49.705,0,90-28.207,90-63s-40.295-63-90-63
> >  c-49.703,0-90,28.207-90,63S40.447,126.15,90.149,126.15z"/>
> >   </defs>
> >
> >   <!-- Call the defined ellipse path into action -->
> >   <use x="10" y="10" xlink:href="#ellipse" />
> >
> >   <!-- This calls the ellipse path and applies a transform to
> create
> > an inset version of the path -->
> >   <use x="10" y="300" xlink:href="#ellipse" transform="scale
> (0.5)"/>
> >
> > </svg>
> >
> > --- In svg-developers@yahoogroups.com, "GTTR" <jagaru58@> wrote:
> > >
> > > I was wondering if anyone can point me to how I could create an
> inset
> > > version of a path that is already defined.  For example if I
> have the
> > > following path, which is a ellipse, I would like to have this
> same
> > > path displayed but also have an inset version of it displayed.
> Sort
> > > of like creating inset borders:
> > >
> > > <path fill="none" stroke="#000000" stroke-width="0.3"
> > > d="M90.149,126.15c49.705,0,90-28.207,90-63s-40.295-63-90-63
> > >  c-49.703,0-90,28.207-90,63S40.447,126.15,90.149,126.15z"/>
> > >
> > > Thanks for taking the time to assist and any help will be
> appreciated.
> > >
> > > Thanks
> > >
> >
>

#56182 From: Sean <scene@...>
Date: Wed Jun 28, 2006 9:10 pm
Subject: Re: getURL/XMLHTTP
couloir007
Send Email Send Email
 
Do you actually append it into an embedded svg doc other than the svg
doc you use to get your segment? Both my calling doc and the doc
associated with the parseXML are svg. I just can't get it to append into
a third svg doc.

Peter Kalev wrote:

> Actually the calling document does not matter, BUT the document
> associated with the parseXML does...
>
> In many cases I use AJAX to get an svg segment and then I just use one
> of the svg's on my html page to parse the returned text into XML and
> then use it...
>
> _____
>
> From: svg-developers@yahoogroups.com
> <mailto:svg-developers%40yahoogroups.com>
> [mailto:svg-developers@yahoogroups.com
> <mailto:svg-developers%40yahoogroups.com>] On Behalf Of Sean
> Sent: Wednesday, June 28, 2006 12:01 PM
> To: svg-developers@yahoogroups.com
> <mailto:svg-developers%40yahoogroups.com>
> Subject: Re: [svg-developers] getURL/XMLHTTP
>
> This appears to be a an issue harder to solve than I thought it would
> be. Below is my javascript code that for the most part works, except for
>
> one thing, the Adobe viewer won't let me call getURL, parse it with
> parseXML, and then insert into an svg doc that is not the calling
> document. I get:
>
> ---------------------------
> Script error
> ---------------------------
> Wrong document
> line: 22, column: 16
>
> Any thoughts on how to get around this would be very much appreciated.
>
> // JavaScript Document
> function addMenu(evt){
> myUrlString = ("F4-Test.php?&menu=Planning");
> getURL(myUrlString,addMenu2);
> }
>
> function addMenu2(data) {
> // alert(data.content);
> if(data.success) {
> var node = parseXML(data.content, document);
> var xml = node.firstChild;
> var id = xml.getAttribute('id');
> var myMenuToAdd;
> child = node.firstChild.firstChild;
> while(child != null){
> // get sibling BEFORE parent changes
> childSibling = child.nextSibling;
> if(child.nodeType==1){
> // alert(window.printNode(child));
> myMenuToAdd =
> parent.document.F4B.getSVGDocument().getElementById("PlanningCanvas");
> myMenuToAdd.appendChild(child);
> }
> child = childSibling;
> }
> }else {
> alert("something went wrong!");
> }
> }
>
> [Non-text portions of this message have been removed]
>
>

#56183 From: Guy Morton <guy@...>
Date: Wed Jun 28, 2006 11:06 pm
Subject: Re: Trouble with hosting company (a bit off topic)
guy_mmmmmm
Send Email Send Email
 
This seems to indicate that they are hosting your DNS and using their
control of that to prevent you from changing hosts - this is not legal
as far as I am aware - your domain name belongs to you, not them, and
you are entitled to change your DNS records as you see fit. This is all
you need to do to change hosts.

Look into who you registered your domain with, and if it was via the
hosting company (always a mistake in my book) you may have a problem, as
they often don't put the client's details in when they register it. If
this is the case you might have a problem, though I'm sure a lawyer
could sort it out for you.

With any luck, though, so long as you are registered as the owner of the
domain, you ought to be able to have it redelegated to another provider
regardless. Your old provider probably can't be forced to remove the old
records in their DNS that will claim that they are authoritative for
your domain, but that will only matter if people are actively referring
to their DNS for lookups, which I doubt.

The first step is to do a whois and a dig on your domain and find out
how it's been set up. Once you know that you ought to be able to
approach either your original registrar (if not the hosting company) and
get it changed, or try approaching another registrar (preferably NOT one
of the cheap guys who typically try and lock you into using them by
making delegating a name away from them very hard) and getting them to
do it on your behalf.

Guy


Richard Pearman wrote:
> Hi,
>
> I'm posting this here because I've never heard of anybody having this sort
> of trouble before and want to know if it's at all unusual and what can be
> done about it.
>
> My old hosting company, Elosoft (aka Nextwebhosting) won't set document
> encoding for SVGZ files so Firefox can't display them on my site.  When I
> tried to point this out to them they acted like they were incapable of
> reading the words "document encoding" or any sentences which contained them.
>
> I'm trying to move to another hosting company.  When I didn't respond to
> Elosoft's request for payment for another years service, they sent me an
> email claiming to have received payment from my credit card.  Upon
> investigation, I discovered that this payment hadn't been processed so I
> stopped it.  However Elosoft haven't stopped hosting my site and are thus
> preventing anybody from accessing the version on my new host.  Elosoft claim
> that the contract (meaning their website, or at least parts of it) say that
> I need to give them 30 days notice of cancelation.  I think the wording in
> ambiguous and I also suspect it has changed since I pointed this out to
> them.
>
> Anyway, is this sort of thing at all unusual?  How do other people deal with
> it?  Can I get the internet to acnowledge my new hosting company without
> Elosoft's cooperation?  Anybody else had problems with Elosoft?
>
> Richard Pearman       http://www.pixelpalaces.com/
> The next stage in the evolution of web comics:
> http://www.onlinecomics.net/pages/details/listing.php?comicID=4415
>
>
>
>
>
>
>
> -----
> To unsubscribe send a message to: svg-developers-unsubscribe@yahoogroups.com
> -or-
> visit http://groups.yahoo.com/group/svg-developers and click "edit my
membership"
> ----
> Yahoo! Groups Links
>
>
>
>
>
>
>

#56184 From: "Andreas Neumann" <neumann@...>
Date: Thu Jun 29, 2006 6:59 am
Subject: Re: Mouse Cursor Handling
neumannandreas
Send Email Send Email
 
yes, just use the cursor attribute.

http://www.w3.org/TR/SVG11/interact.html#Cursors

Cursors aren't implemented in Adobe SVG viewer version 3 but in all other
viewers (Opera9,
MozillaSVG, Batik, ASV6).

Andreas

--- In svg-developers@yahoogroups.com, "pavoturkey" <pavoturkey@...> wrote:
>
> Is it possible with SVG to change the mouse cursor icon when you mouse
> over svg elements?
>
> For example when you mouse over a <circle> or <rect> element defined
> in your svg document, have the cursor change from the default pointer
> icon to say a hand icon.
>
> Just curious, thanks.
>

#56185 From: Guy Morton <guy@...>
Date: Thu Jun 29, 2006 7:09 am
Subject: Re: Re: Mouse Cursor Handling
guy_mmmmmm
Send Email Send Email
 
and you can use the <a> element around other elements to make it happen
in ASV. ugly, but it works.

Guy

Andreas Neumann wrote:
> yes, just use the cursor attribute.
>
> http://www.w3.org/TR/SVG11/interact.html#Cursors
>
> Cursors aren't implemented in Adobe SVG viewer version 3 but in all other
viewers (Opera9,
> MozillaSVG, Batik, ASV6).
>
> Andreas
>
> --- In svg-developers@yahoogroups.com, "pavoturkey" <pavoturkey@...> wrote:
>
>> Is it possible with SVG to change the mouse cursor icon when you mouse
>> over svg elements?
>>
>> For example when you mouse over a <circle> or <rect> element defined
>> in your svg document, have the cursor change from the default pointer
>> icon to say a hand icon.
>>
>> Just curious, thanks.
>>
>>
>
>
>
>
>
>
>
> -----
> To unsubscribe send a message to: svg-developers-unsubscribe@yahoogroups.com
> -or-
> visit http://groups.yahoo.com/group/svg-developers and click "edit my
membership"
> ----
> Yahoo! Groups Links
>
>
>
>
>
>
>
>


[Non-text portions of this message have been removed]

#56186 From: "achio_84" <achio_84@...>
Date: Thu Jun 29, 2006 8:40 am
Subject: display changes in two panes(svg files)
achio_84
Send Email Send Email
 
Hi all....

The exact situation that I'm facing is that, now, I have an svg file
for drawing. And I wish to give the user different view of the drawing
being drawn in the canvas.
I wish to have two panes in 1 web form. 1 for the design/drawing and
another 1 for the overview of the drawing drawn in the design/drawing
pane.
I hope that when the user draws a shape in the design pane, the result
will also be shown in the overview pane instantly.
Can svg or any programming language manage to do that?

Thanks...

achio.

#56187 From: "pothoven" <pothoven@...>
Date: Wed Jun 28, 2006 8:11 pm
Subject: Help with dynamic inline SVG
pothoven
Send Email Send Email
 
I am trying to embed an SVG graph that is generated dynmically on the
client side.  This is for an Ajax application which receives XML data
for  the graph.  An XSLT is applied to the XML to generate the SVG.

I figured out a method to dynamically add the SVG inline (detail
provided here:
http://pothoven.blogspot.com/2006/05/inline-dynamic-svg-from-xml-with-aj\
ax.html
<http://pothoven.blogspot.com/2006/05/inline-dynamic-svg-from-xml-with-a\
jax.html> ) however, that method has a problem when trying to add events
to the SVG (like mouseover).

Instead of describing my problem in this post, I've tried to describe my
problem on this page
http://pothoven.blogspot.com/2006/06/help-with-dynamic-inline-svg.html
<http://pothoven.blogspot.com/2006/06/help-with-dynamic-inline-svg.html>
so I could add some screenshots and code samples.

Any help would be appreciated!
Thanks,
Steve


[Non-text portions of this message have been removed]

#56188 From: "Martin Honnen" <honnen_martin@...>
Date: Thu Jun 29, 2006 1:29 pm
Subject: Re: getURL/XMLHTTP
honnen_martin
Send Email Send Email
 
--- In svg-developers@yahoogroups.com, Sean <scene@...> wrote:
>
> Do you actually append it into an embedded svg doc other than the svg
> doc you use to get your segment? Both my calling doc and the doc
> associated with the parseXML are svg. I just can't get it to append
into
> a third svg doc.

> > var node = parseXML(data.content, document);

You should pass that document to the parseXML function as its second
argument that you want to insert the nodes into.

#56189 From: "Martin Honnen" <honnen_martin@...>
Date: Thu Jun 29, 2006 1:53 pm
Subject: Re: Help with dynamic inline SVG
honnen_martin
Send Email Send Email
 
--- In svg-developers@yahoogroups.com, "pothoven" <pothoven@...> wrote:


> Instead of describing my problem in this post, I've tried to describe my
> problem on this page
> http://pothoven.blogspot.com/2006/06/help-with-dynamic-inline-svg.html
> <http://pothoven.blogspot.com/2006/06/help-with-dynamic-inline-svg.html>
> so I could add some screenshots and code samples.

As for Firefox and the SMIL way of a mouseover/out (e.g.
   <set attributeName="fill" from="rgb(68,0,0)" to="red"
begin="mouseover" end="mouseout" />)
Firefox 1.5 does not support any SMIL in SVG so far at all. This will
not change in Firefox 2.0 as far as I understand.
You could however use DOM event handlers e.g.

<svg:rect x="263" y="250.2" height="79.80000000000001" width="109"
   fill="rgb(68,0,0)"
   onmouseover="evt.target.setAttribute('fill', 'red');"
   onmouseout="evt.target.setAttribute('fill', 'rgb(68,0,0)');" />


As for embedded inline SVG with IE/Win and Adobe SVG viewer, I don't
know of a way to get event handlers on any but the SVG svg element
itself working. If you want full interactivity with the Adobe SVG
viewer and IE then using the embed element (e.g.
   <embed type="image/svg+xml"
          src="file.svg"
          width="200" height="200">
) seems the way to go.

#56190 From: "Peter Kalev" <peterk@...>
Date: Thu Jun 29, 2006 3:40 pm
Subject: RE: getURL/XMLHTTP
peterkalev2002
Send Email Send Email
 
I noticed the same thing (ASV3.0 & IE6.0) - can't you use the third
doc's 'parseXML'?



When I load my HTML page and the embedded svg's load they identify
themselves to the 'mother' page and then I use them as part of the DOM.
I have to be careful which one I use for the 'parseXML', but when I call
my web services I use a 'generic' AJAX method.



   _____

From: svg-developers@yahoogroups.com
[mailto:svg-developers@yahoogroups.com] On Behalf Of Sean
Sent: Wednesday, June 28, 2006 2:11 PM
To: svg-developers@yahoogroups.com
Subject: Re: [svg-developers] getURL/XMLHTTP



Do you actually append it into an embedded svg doc other than the svg
doc you use to get your segment? Both my calling doc and the doc
associated with the parseXML are svg. I just can't get it to append into

a third svg doc.

Peter Kalev wrote:

> Actually the calling document does not matter, BUT the document
> associated with the parseXML does...
>
> In many cases I use AJAX to get an svg segment and then I just use one
> of the svg's on my html page to parse the returned text into XML and
> then use it...
>
> _____
>
> From: svg-developers@yahoogroups.com
<mailto:svg-developers%40yahoogroups.com>
> <mailto:svg-developers%40yahoogroups.com>
> [mailto:svg-developers@yahoogroups.com
<mailto:svg-developers%40yahoogroups.com>
> <mailto:svg-developers%40yahoogroups.com>] On Behalf Of Sean
> Sent: Wednesday, June 28, 2006 12:01 PM
> To: svg-developers@yahoogroups.com
<mailto:svg-developers%40yahoogroups.com>
> <mailto:svg-developers%40yahoogroups.com>
> Subject: Re: [svg-developers] getURL/XMLHTTP
>
> This appears to be a an issue harder to solve than I thought it would
> be. Below is my javascript code that for the most part works, except
for
>
> one thing, the Adobe viewer won't let me call getURL, parse it with
> parseXML, and then insert into an svg doc that is not the calling
> document. I get:
>
> ---------------------------
> Script error
> ---------------------------
> Wrong document
> line: 22, column: 16
>
> Any thoughts on how to get around this would be very much appreciated.
>
> // JavaScript Document
> function addMenu(evt){
> myUrlString = ("F4-Test.php?&menu=Planning");
> getURL(myUrlString,addMenu2);
> }
>
> function addMenu2(data) {
> // alert(data.content);
> if(data.success) {
> var node = parseXML(data.content, document);
> var xml = node.firstChild;
> var id = xml.getAttribute('id');
> var myMenuToAdd;
> child = node.firstChild.firstChild;
> while(child != null){
> // get sibling BEFORE parent changes
> childSibling = child.nextSibling;
> if(child.nodeType==1){
> // alert(window.printNode(child));
> myMenuToAdd =
> parent.document.F4B.getSVGDocument().getElementById("PlanningCanvas");
> myMenuToAdd.appendChild(child);
> }
> child = childSibling;
> }
> }else {
> alert("something went wrong!");
> }
> }
>
> [Non-text portions of this message have been removed]
>
>





[Non-text portions of this message have been removed]

#56191 From: "pothoven" <pothoven@...>
Date: Thu Jun 29, 2006 7:08 pm
Subject: Re: Help with dynamic inline SVG
pothoven
Send Email Send Email
 
Thanks for the tip on the DOM event handlers for Firefox!

Unfortunately, the embed option for IE really isn't an option since I
have no file to point the src to as the SVG was generated dynamically.
  Since the embed tag isn't part of the w3c spec and doesn't support
inline data ('data:image/svg+xml,'+ theSvgData) I can't add it inline.

Steve

#56192 From: "talkli" <talkli@...>
Date: Thu Jun 29, 2006 7:37 pm
Subject: 'Back' Button in SVG
talkli
Send Email Send Email
 
Hi,

As everyone knows, that SVG can be manipulated with javascript. But
how can i go back to the previous status of the SVG file after the
manipulation? And how can i solve this problem, especially wenn the
manipulation is based on AJAX (with new information from server)?

Thanx in advance!

#56193 From: Sean <scene@...>
Date: Thu Jun 29, 2006 8:03 pm
Subject: Re: Re: getURL/XMLHTTP
couloir007
Send Email Send Email
 
Thank you so much. At first, I completely missed the relevance of what
you said. Then it hit me. Basically, instead of
var node = parseXML(data.content, document);

I needed:
var node = parseXML(data.content, parent.document.F4B.getSVGDocument());

Perfect!

Sean

Martin Honnen wrote:

> --- In svg-developers@yahoogroups.com
> <mailto:svg-developers%40yahoogroups.com>, Sean <scene@...> wrote:
> >
> > Do you actually append it into an embedded svg doc other than the svg
> > doc you use to get your segment? Both my calling doc and the doc
> > associated with the parseXML are svg. I just can't get it to append
> into
> > a third svg doc.
>
> > > var node = parseXML(data.content, document);
>
> You should pass that document to the parseXML function as its second
> argument that you want to insert the nodes into.
>
>

#56194 From: Sean <scene@...>
Date: Thu Jun 29, 2006 8:34 pm
Subject: Re: 'Back' Button in SVG
couloir007
Send Email Send Email
 
For mapping, I use a g tag like:
<!-- previous extent variable -->
<g id='prevExt'/>

and set a value such as ext='0 0 500 600' based on the current status
before moving on to the new one. Then if I want to go back, I just
getAttribute('ext') and set my viewBox to it.

Sean

talkli wrote:

> Hi,
>
> As everyone knows, that SVG can be manipulated with javascript. But
> how can i go back to the previous status of the SVG file after the
> manipulation? And how can i solve this problem, especially wenn the
> manipulation is based on AJAX (with new information from server)?
>
> Thanx in advance!
>
>

#56195 From: "talkli" <talkli@...>
Date: Thu Jun 29, 2006 10:26 pm
Subject: Re: 'Back' Button in SVG
talkli
Send Email Send Email
 
That means, for every new status i need a new g tag. if i want to go
back to the status before the previous one, i need to use 2 g tags???

Di




--- In svg-developers@yahoogroups.com, Sean <scene@...> wrote:
>
> For mapping, I use a g tag like:
> <!-- previous extent variable -->
> <g id='prevExt'/>
>
> and set a value such as ext='0 0 500 600' based on the current status
> before moving on to the new one. Then if I want to go back, I just
> getAttribute('ext') and set my viewBox to it.
>
> Sean

#56196 From: Sean <scene@...>
Date: Thu Jun 29, 2006 10:43 pm
Subject: Re: Re: 'Back' Button in SVG
couloir007
Send Email Send Email
 
Below is how it looks when I zoom or pan 5 times, the first is set
onLoad. When I hit previous, I get the most recent one and delete it. I
suppose it could add a lot of size if there were a lot of panning and
zooming, but it would take a real lot to add anything significant.

<g id="prevExt">
     <g id="ext1" viewBox="481071 -4396898 7394 6140"/>
     <g id="ext2" viewBox="483019 -4394283 1641 1363"/>
     <g id="ext3" viewBox="483655 -4395029 2183 1813"/>
     <g id="ext4" viewBox="484640 -4394254 299 248"/>
     <g id="ext5" viewBox="484738 -4394145 48 40"/>
     <g id="ext6" viewBox="484752 -4394134 19 15"/>
</g>

Sean

talkli wrote:

> That means, for every new status i need a new g tag. if i want to go
> back to the status before the previous one, i need to use 2 g tags???
>
> Di
>
> --- In svg-developers@yahoogroups.com
> <mailto:svg-developers%40yahoogroups.com>, Sean <scene@...> wrote:
> >
> > For mapping, I use a g tag like:
> > <!-- previous extent variable -->
> > <g id='prevExt'/>
> >
> > and set a value such as ext='0 0 500 600' based on the current status
> > before moving on to the new one. Then if I want to go back, I just
> > getAttribute('ext') and set my viewBox to it.
> >
> > Sean
>
>

#56197 From: "cqlow" <cqlow@...>
Date: Fri Jun 30, 2006 1:51 am
Subject: Re: Non-Arial font displayed in SVG file
cqlow
Send Email Send Email
 
anyone has any ideas?

--- In svg-developers@yahoogroups.com, "cqlow" <cqlow@...> wrote:
>
> hi
>
> I have a 3rd party program tat generate a SVG file. When i opened in
> IE6, (Adobe SVG Viewer) 3.0 is installed, i see some non-Arial font
> displayed.
> Screen shot : http://www.quizk.com/temp/SVGerror.JPG
>
> On another PC, the same SVG file displays fine.
>
> any ideas?
>
> Regards
> CQ
>

#56198 From: "GTTR" <jagaru58@...>
Date: Fri Jun 30, 2006 3:18 am
Subject: Re: Is there any easy way to create an inset from the path?
GTTR
Send Email Send Email
 
That's awesome!  I am going to play with this to see if I can do it
dynamically with our program.  That is dynamically placing values in
the translate equation.  Thanks for your help.


--- In svg-developers@yahoogroups.com, "pavoturkey" <pavoturkey@...>
wrote:
>
> You can do more than just a scale transformation
> Try this out, I added in a translation call to the transform to
> produce a more desirable output along what maybe you are looking
for.
> I added the method call "translate(x y)" to the transform. The
> translate call moves the ellipse to where I want it to display, and
> the scale call sizes the ellipse for me. So you can essentially
> position and size your ellipse however you want it on your svg
> document. I decided to create multiple inset versions of the
ellipse
> for you just for fun.
>
> <svg>
>
> <!-- Define the ellipse path and give it an id attribute -->
> <defs>
> <path id="ellipse" fill="none" stroke="#000000" stroke-width="0.3"
> d="M90.149,126.15c49.705,0,90-28.207,90-63s-40.295-63-90-63
> c-49.703,0-90,28.207-90,63S40.447,126.15,90.149,126.15z"/>
> </defs>
>
> <!-- Call the defined ellipse path into action -->
> <use x="10" y="10" xlink:href="#ellipse" />
>
> <!-- This calls the ellipse path and applies a transform to create
> an inset version of the path -->
> <use x="10" y="10" xlink:href="#ellipse" transform="translate(10 7)
> scale(0.9)"/>
> <use x="10" y="10" xlink:href="#ellipse" transform="translate(20
14)
> scale(0.8)"/>
> <use x="10" y="10" xlink:href="#ellipse" transform="translate(30
21)
> scale(0.7)"/>
> <use x="10" y="10" xlink:href="#ellipse" transform="translate(40
28)
> scale(0.6)"/>
> <use x="10" y="10" xlink:href="#ellipse" transform="translate(50
35)
> scale(0.5)"/>
> <use x="10" y="10" xlink:href="#ellipse" transform="translate(60
42)
> scale(0.4)"/>
> <use x="10" y="10" xlink:href="#ellipse" transform="translate(70
49)
> scale(0.3)"/>
> <use x="10" y="10" xlink:href="#ellipse" transform="translate(80
56)
> scale(0.2)"/>
> <use x="10" y="10" xlink:href="#ellipse" transform="translate(90
63)
> scale(0.1)"/>
> </svg>
>
>
> This is an update from the previous code sample, notice I am
supplying
> a different transform expression, "translate(x y) scale(x)". Here I
> am translating the path and also scaling it to produce the affect
I want.
>
> --- In svg-developers@yahoogroups.com, "GTTR" <jagaru58@> wrote:
> >
> > Thank you for your help.  I have tried to use the
transform="scale
> > (0.5)", but it doesn't give the results that I am looking for.
I
> > need to somehow inset it within the current path data using the
> > current coordinate system.  I know it is possible to do using
some
> > type of transform matrix because Inkscape has an inset/offset
> > function in it, but I am just not sure of the math or possibly
not
> > sure if there is something else that can be used with the scale
> > transform.
> >
> > I guess in a sense, I need to take each point within the path
data,
> > do some type of calculation that will inset it in a certain
> > amount.
> >
> > --- In svg-developers@yahoogroups.com, "pavoturkey"
<pavoturkey@>
> > wrote:
> > >
> > > Try using <defs> and the <use> tags. Define a <def> of your
ellipse
> > > path and then you can call this defined ellipse any number of
> > times by
> > > issuing the <use> tag 'n' amount of times.
> > >
> > > Here is sample code for how to do this:
> > >
> > > <svg>
> > >
> > >   <!-- Define the ellipse path and give it an id attribute -->
> > >   <defs>
> > >     <path id="ellipse" fill="none" stroke="#000000" stroke-
> > width="0.3"
> > >  d="M90.149,126.15c49.705,0,90-28.207,90-63s-40.295-63-90-63
> > >  c-49.703,0-90,28.207-90,63S40.447,126.15,90.149,126.15z"/>
> > >   </defs>
> > >
> > >   <!-- Call the defined ellipse path into action -->
> > >   <use x="10" y="10" xlink:href="#ellipse" />
> > >
> > >   <!-- This calls the ellipse path and applies a transform to
> > create
> > > an inset version of the path -->
> > >   <use x="10" y="300" xlink:href="#ellipse" transform="scale
> > (0.5)"/>
> > >
> > > </svg>
> > >
> > > --- In svg-developers@yahoogroups.com, "GTTR" <jagaru58@>
wrote:
> > > >
> > > > I was wondering if anyone can point me to how I could create
an
> > inset
> > > > version of a path that is already defined.  For example if I
> > have the
> > > > following path, which is a ellipse, I would like to have
this
> > same
> > > > path displayed but also have an inset version of it
displayed.
> > Sort
> > > > of like creating inset borders:
> > > >
> > > > <path fill="none" stroke="#000000" stroke-width="0.3"
> > > > d="M90.149,126.15c49.705,0,90-28.207,90-63s-40.295-63-90-63
> > > >  c-49.703,0-90,28.207-
90,63S40.447,126.15,90.149,126.15z"/>
> > > >
> > > > Thanks for taking the time to assist and any help will be
> > appreciated.
> > > >
> > > > Thanks
> > > >
> > >
> >
>

#56199 From: "Marcel" <marceltinka@...>
Date: Fri Jun 30, 2006 11:44 am
Subject: Error using navigation.js from Carto.net
marceltinka
Send Email Send Email
 
Hello,

maybe someone can help me?

I am using the example from carto.net as the basic for my tries.
I want to recenter the map and zoom in at a random point.

I tried to use the
"myMainMap.setNewViewBox(xmin,ymin,xmax,ymax,history)"
method.

The results of xmin and xmax are fine.
The Ymin and ymax results are negative(-). Later they get multiplied
with (-1) so that my new viewbox isn't in the map area.

If I try to handle the results I get negative results for coordinate
display on the side.

Is there another method or function I have to use.

Thanks for your help!

Marcel

#56200 From: "Martin Honnen" <honnen_martin@...>
Date: Fri Jun 30, 2006 1:04 pm
Subject: Re: Help with dynamic inline SVG
honnen_martin
Send Email Send Email
 
--- In svg-developers@yahoogroups.com, "pothoven" <pothoven@...> wrote:


> Unfortunately, the embed option for IE really isn't an option since I
> have no file to point the src to as the SVG was generated dynamically.
>  Since the embed tag isn't part of the w3c spec and doesn't support
> inline data ('data:image/svg+xml,'+ theSvgData) I can't add it inline.

Well you could always load some empty dummy SVG document (e.g.
   <svg xmlns="http://www.w3.org/2000/svg"></svg>
) in the embed element and then later add elements to that document,
even if those elements are dynamically created.
But it's your choice, if the inline SVG works for you, it is certainly
in some ways nicer than using an embed element.

#56201 From: "Andreas Neumann" <neumann@...>
Date: Fri Jun 30, 2006 1:51 pm
Subject: Re: Error using navigation.js from Carto.net
neumannandreas
Send Email Send Email
 
Hi Marcel,

In the method .setNewViewBox() you have to pass real world
coordinates, not the inverted ones. The script inverts the y-
coordinates in the method .setNewViewBox().

Likewise in the method .showCoordinates() inverts the y-axis prior to
display in order to display coordinate values correctly. Note,
however, that the method .calcCoord() does not invert the y-axis. You
have to multiply the result of this method by -1 for the y-axis. This
method is also used internally within the map object.

I hope this helps. Let me know if you still have problems.

Andreas

--- In svg-developers@yahoogroups.com, "Marcel" <marceltinka@...>
wrote:
>
> Hello,
>
> maybe someone can help me?
>
> I am using the example from carto.net as the basic for my tries.
> I want to recenter the map and zoom in at a random point.
>
> I tried to use the
> "myMainMap.setNewViewBox(xmin,ymin,xmax,ymax,history)"
> method.
>
> The results of xmin and xmax are fine.
> The Ymin and ymax results are negative(-). Later they get
multiplied
> with (-1) so that my new viewbox isn't in the map area.
>
> If I try to handle the results I get negative results for
coordinate
> display on the side.
>
> Is there another method or function I have to use.
>
> Thanks for your help!
>
> Marcel
>

#56202 From: "pothoven" <pothoven@...>
Date: Fri Jun 30, 2006 3:36 pm
Subject: Re: Help with dynamic inline SVG
pothoven
Send Email Send Email
 
--- In svg-developers@yahoogroups.com, "Martin Honnen"
<honnen_martin@...> wrote:
>
> Well you could always load some empty dummy SVG document (e.g.
>   <svg xmlns="http://www.w3.org/2000/svg"></svg>
> ) in the embed element and then later add elements to that document,
> even if those elements are dynamically created.
> But it's your choice, if the inline SVG works for you, it is certainly
> in some ways nicer than using an embed element.
>
That's an interesting idea.  How can I access the data of the embedded
SVG to manipulate it?

Steve

#56203 From: "pothoven" <pothoven@...>
Date: Fri Jun 30, 2006 3:46 pm
Subject: Re: Help with dynamic inline SVG
pothoven
Send Email Send Email
 
Just wanted to follow up and say that your method of coloring and
mouseover events made the coloring work for the inline version in IE
and made the mouse over events work correctly in Firefox.  So the only
thing not working is the mouse over events when the SVG is inline in
IE which works when the SVG is embedded.

I had gotten my coloring method from this article,
http://www-128.ibm.com/developerworks/xml/library/x-svggrph/, and my
mouseover method from this article,
http://www-128.ibm.com/developerworks/xml/library/x-svgint/ but
apparently those aren't the best methods.

Also, I've added your helpful comments to the end of the original
posting:
http://pothoven.blogspot.com/2006/06/help-with-dynamic-inline-svg.html#comments

Steve

#56204 From: "Martin Honnen" <honnen_martin@...>
Date: Fri Jun 30, 2006 4:15 pm
Subject: Re: Help with dynamic inline SVG
honnen_martin
Send Email Send Email
 
--- In svg-developers@yahoogroups.com, "pothoven" <pothoven@...> wrote:

> How can I access the data of the embedded
> SVG to manipulate it?

If you have e.g.
   <embed name="embedName"
          type="image/svg+xml"
          src="file.svg"
          width="somewidth" height="someheight">
in the HTML document then you can access the embed element as
   var embed = document.embeds.embedName;
and then if the viewer/browser supports SVG and script access to the
SVG then it exposes a method getSVGDocument e.g.
   if (typeof embed.getSVGDocument != 'undefined') {
     var svgDocument = embed.getSVGDocument();
     // now use the the SVG document to access nodes with
     // getElementById, getElementsByTagNameNS,
     // to create nodes with e.g. createElementNS
   }

IE/Win with the Adobe viewer exposes that method getSVGDocument and
the native SVG implementations in Firefox 1.5 and Opera 9 do too.

#56205 From: Darryl Watson <dwatson@...>
Date: Fri Jun 30, 2006 7:52 pm
Subject: ActiveX workaround?
Darryl_Watson
Send Email Send Email
 
Did anyone ever come up with a fix or workaround for the ActiveX click
problem in IE?

#56206 From: Darryl Watson <dwatson@...>
Date: Fri Jun 30, 2006 9:52 pm
Subject: Changing inner SVG element attributes?
Darryl_Watson
Send Email Send Email
 
Hi-

I have an SVG file with an inner SVG element with its own coordinate
system and elements.  I want to change the inner SVG element viewBox or
translate/scale values in IE and ASV 3.03, but the viewer seems to
ignore my change attempts.

Example code:

<svg id="outer" viewBox="0 0 500 500" ... >
     <svg id="inner" viewBox="0 0 900 900" ...>
        <rect id=""... />
     </svg>
</svg>

I try to do things like:

var myNode = document.getElementById('inner');
myNode.setAttribute('viewBox', '0 0 1500 1500');      // simulate a zoom
out, doesn't change the drawing

or

myNode.setAttribute('transform', 'scale(2, 2)');

Neither seems to work, but I don't get errors either.  What am I doing
wrong?  Thanks!

Messages 56176 - 56206 of 66120   Oldest  |  < Older  |  Newer >  |  Newest
Add to My Yahoo!      XML What's This?

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help