drop a previously added xml layer

kelum
07-12-2004, 12:55 AM
hi,
i have a problem with getURL method.
using the following code i add the xml file to existing svg content.

var new_node //global variable
function get_url(evt)
{
svgdoc = evt.target.ownerDocument
getURL("rivers"+count+".xml",callback)

}
function callback(data)
{
if (data.success)
{
new_node= parseXML(data.content,svgdoc)

svgdoc.getElementById("base").appendChild(new_node)
}

then i try to drop that xml file using following method.

bnode=svgdoc.getElementById("base") //base--parent of the added layer
bnode.removeChild(new_node)

but this give error like DOMERROR ......

if you can pls help me
regards,
kelum

Anonymous
07-12-2004, 07:01 AM
Why not use this ?

bnode=svgdoc.getElementById("base") //base--parent of the added layer
bnode.parentNode.removeChild(bnode)


Michel

kelum
07-13-2004, 05:23 AM
hi,
thanks for your help.
is there any way to create list box in svg.
regards,
kelum.

Anonymous
07-13-2004, 06:44 AM
You can find at
http://pilat.free.fr/english/svg_lib/index.htm

reusable components, list box with or without scrolling

Michel

 
Web mp2kmag.com
mapforums.com

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum