<community>of XML and SVG Developers</community>
This is a discussion on getURL/parseXML does not work within the SVG Questions forums, part of the SVG Forums category; Hi there, I have a very simple code for getURL() and parseURL() which works just fine when I run svg ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| I have a very simple code for getURL() and parseURL() which works just fine when I run svg file as standalone page. But it does not work when I render the same svg file through webserver! The code is: Code: <?xml version="1.0" standalone="no"?>
<svg width="800" height="500" xmlns="http://www.w3.org/2000/svg" onload="init(evt)">
<desc>On Click Presence </desc>
<defs>
<script type="text/ecmascript"><![CDATA[
var svgDoc;
function init(evt){
svgDoc = evt.getTarget().getOwnerDocument();
}
function go() {
getURL(somehtml.html',fn)
}
function fn(obj) {
alert("comes to fn");
var root = parseXML(obj.content, svgDoc).firstChild;
var nchild=root.lastChild;
alert("Done!!");
}
]]></script>
</defs>
<rect onclick="go(evt)" id="Box1" x="125" y="100" width="200" height="100" stroke="blue" fill="white"/>
</svg>
and the html file is: Code: <html> <head> </head> <body> Test </body> </html> I would really appreciate it if someone can throw some light on this subject. Thanks. |
![]() |
| Tags |
| geturl or parsexml, work |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
Inkjet Printer Cartridges...
Now you can order your inkjet printer cartridges online.
compatible ink cartridge
Get a compatible ink cartridge from us. Benefit from better value, longer print life, top quality and a complete guarantee with support!
Hard Disk Drive Repair Recovery Manchester
Find specialized and cost effective data recovery and repair for your hard drive. Connect to this site.