my dog learned polymorphism*
The moose likes XML and Related Technologies and the fly likes Regarding SVG's Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Regarding SVG Watch "Regarding SVG New topic
Author

Regarding SVG's

Priya Sri
Ranch Hand

Joined: Mar 30, 2004
Posts: 84
what i need to do is I should have one textbox named length and whatever i enter the value in that length,that length should be passed to a <line> attribute as parameter..... and the line should change with that value length....

I wrote line.svg as below....


<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20001102//EN" "http://www.w3.org/TR/2000/CR-SVG-20001102/DTD/svg-20001102.dtd">

<svg width="500" height="400">
<line x1="10" y1="10" x2="490" y2="390" style="stroke:#FF0000; stroke-width:5;"/>
</svg>

and I called this line.svg in my mysvg.html page as below...

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<body><object data="line.svg" width="500"
height="500" type="image/svg+xml">
<embed src="line.svg" width="500"
height="500" type="image/svg+xml" />
</object>
</body>
</html>

how to pass that length value (textbox) to the <line> tag x1,x2 attributes
so that the line changes accordingly...

Guide me...
priya sri
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Regarding SVG's
 
Similar Threads
XPathAPI with SVGDocument
Navigation Problem
!DOCTYPE and function refreshIt() not working together
!DOCTYPE and function refreshIt() not working together
Entities and JDOM