File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Regarding SVG Watch "Regarding SVG New topic

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" "">

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

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

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<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" />

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:
subject: Regarding SVG's
It's not a secret anymore!