<community>of XML and SVG Developers</community>
This is a discussion on input/output by keyboard within the SVG Questions forums, part of the SVG Forums category; Hi guys, I have a "little" problem. I would like to allow the user to write in a text box ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| 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 |
| |||
|
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 |
| |||
|
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 |
| |||
| Quote:
can't help finding a new brain for you, though -- sorry! ![]() |
| |||
|
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 |
| |||
|
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 |
![]() |
| Tags |
| input or output, keyboard |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
Printer Cartridges
Low Price printer cartridges. Free UK delivery on compatible printer cartridges. Over 50,000 printer cartridges in stock.
canon ink cartridges
Get Canon Ink cartridges at cheap prices. Huge selection of ink cartridges available.
HARD DISK DRIVE REPAIR RECOVERY MANCHESTER
We are in Manchester and we can fix your problems with hard disk drive repair and data recovery. Do not try to do it yourself!