input/output by keyboard

fable
04-14-2005, 05:23 PM
Hi guys,
I have a "little" problem. I would like to allow the user to write in a text box and use this input as parameter in my javascript. How can I do that? Also, I don't know if it is possible to edit a text box in SVG....
Thanks for your support
Fabiana

Anonymous
04-15-2005, 03:38 AM
Example using ASV3
http://pilat.free.fr/english/svg_lib/alert.htm

If you use ASV6 beta, you can put text with editable="true", user can modify this text

Michel

ioiufo
04-16-2005, 07:06 AM
Great!!!! Thanks a lot!!!!
Fable

ioiufo
04-25-2005, 05:07 AM
Hi Michel,
if I use the 6 version for edit a text, in the same file I can't use the method getOwnerDocument() and I need it to create a new element.
Have you any idea for solving this second problem?
Thanks a lot for your time
Fabiana

Anonymous
04-25-2005, 05:21 AM
Use ownerDocument simply.
By example
svgdoc = evt.target.ownerDocument

Michel

ioiufo
04-25-2005, 06:04 AM
I'm very very studip: I dinistalled asv6 and now I aren't able to find it again...
:'(
help me!! I need a new brain!!!!

hauke
04-25-2005, 06:34 AM
I'm very very studip: I dinistalled asv6 and now I aren't able to find it again...
help me!! I need a new brain!!!!ASV6beta (http://www.adobe.com/svg/viewer/install/beta.html)
can't help finding a new brain for you, though -- sorry! ;)

ioiufo
04-25-2005, 06:57 AM
YOU ARE GREAT!!!!!! I MUST DO A STATUE!!!!

However, the problem remain... This is a piece of my code
function addbird(evt)
{
/* var svgobj = evt.target;
var svgdoc = evt.target.ownerDocument();*/
var newbird = evt.target.cloneNode(false); I tried to do directly this one,but nothing!
svgstyle = newbird.getStyle();
..........
I also added the ns url (<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink")
But the problem is the same: method not supported!!!!! The raw "var svgobj = evt.target" is ok. Where I can find the list of methods supported?
With love ( :wink: )
Fabiana

Anonymous
04-25-2005, 01:50 PM
For methods, look at
http://www.learnsvg.com/tutorial2/catalog.php
Click on method to get example with code.

Use
var svgdoc = evt.target.ownerDocument
and not
var svgdoc = evt.target.ownerDocument()

In your code, you clone a node, but to get this node in DOM, you have to append it somewhere.

Michel

 
Web mp2kmag.com
mapforums.com

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum