RE: [svg-developers] getURL/XMLHTTP
I noticed the same thing (ASV3.0 IE6.0) - can't you use the third doc's 'parseXML'? When I load my HTML page and the embedded svg's load they identify themselves to the 'mother' page and then I use them as part of the DOM. I have to be careful which one I use for the 'parseXML', but when I call my web services I use a 'generic' AJAX method. _ From: svg-developers@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Sean Sent: Wednesday, June 28, 2006 2:11 PM To: svg-developers@yahoogroups.com Subject: Re: [svg-developers] getURL/XMLHTTP Do you actually append it into an embedded svg doc other than the svg doc you use to get your segment? Both my calling doc and the doc associated with the parseXML are svg. I just can't get it to append into a third svg doc. Peter Kalev wrote: Actually the calling document does not matter, BUT the document associated with the parseXML does... In many cases I use AJAX to get an svg segment and then I just use one of the svg's on my html page to parse the returned text into XML and then use it... _ From: svg-developers@yahoogroups.com mailto:svg-developers%40yahoogroups.com mailto:svg-developers%40yahoogroups.com [mailto:svg-developers@yahoogroups.com mailto:svg-developers%40yahoogroups.com mailto:svg-developers%40yahoogroups.com] On Behalf Of Sean Sent: Wednesday, June 28, 2006 12:01 PM To: svg-developers@yahoogroups.com mailto:svg-developers%40yahoogroups.com mailto:svg-developers%40yahoogroups.com Subject: Re: [svg-developers] getURL/XMLHTTP This appears to be a an issue harder to solve than I thought it would be. Below is my javascript code that for the most part works, except for one thing, the Adobe viewer won't let me call getURL, parse it with parseXML, and then insert into an svg doc that is not the calling document. I get: --- Script error --- Wrong document line: 22, column: 16 Any thoughts on how to get around this would be very much appreciated. // JavaScript Document function addMenu(evt){ myUrlString = (F4-Test.php?menu=Planning); getURL(myUrlString,addMenu2); } function addMenu2(data) { // alert(data.content); if(data.success) { var node = parseXML(data.content, document); var xml = node.firstChild; var id = xml.getAttribute('id'); var myMenuToAdd; child = node.firstChild.firstChild; while(child != null){ // get sibling BEFORE parent changes childSibling = child.nextSibling; if(child.nodeType==1){ // alert(window.printNode(child)); myMenuToAdd = parent.document.F4B.getSVGDocument().getElementById(PlanningCanvas); myMenuToAdd.appendChild(child); } child = childSibling; } }else { alert(something went wrong!); } } [Non-text portions of this message have been removed] [Non-text portions of this message have been removed] Yahoo! Groups Sponsor ~-- Something is new at Yahoo! Groups. Check out the enhanced email design. http://us.click.yahoo.com/SISQkA/gOaOAA/yQLSAA/1U_rlB/TM ~- - To unsubscribe send a message to: [EMAIL PROTECTED] -or- visit http://groups.yahoo.com/group/svg-developers and click edit my membership Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/svg-developers/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [svg-developers] getURL/XMLHTTP
Do you actually append it into an embedded svg doc other than the svg doc you use to get your segment? Both my calling doc and the doc associated with the parseXML are svg. I just can't get it to append into a third svg doc. Peter Kalev wrote: Actually the calling document does not matter, BUT the document associated with the parseXML does... In many cases I use AJAX to get an svg segment and then I just use one of the svg's on my html page to parse the returned text into XML and then use it... _ From: svg-developers@yahoogroups.com mailto:svg-developers%40yahoogroups.com [mailto:svg-developers@yahoogroups.com mailto:svg-developers%40yahoogroups.com] On Behalf Of Sean Sent: Wednesday, June 28, 2006 12:01 PM To: svg-developers@yahoogroups.com mailto:svg-developers%40yahoogroups.com Subject: Re: [svg-developers] getURL/XMLHTTP This appears to be a an issue harder to solve than I thought it would be. Below is my javascript code that for the most part works, except for one thing, the Adobe viewer won't let me call getURL, parse it with parseXML, and then insert into an svg doc that is not the calling document. I get: --- Script error --- Wrong document line: 22, column: 16 Any thoughts on how to get around this would be very much appreciated. // JavaScript Document function addMenu(evt){ myUrlString = (F4-Test.php?menu=Planning); getURL(myUrlString,addMenu2); } function addMenu2(data) { // alert(data.content); if(data.success) { var node = parseXML(data.content, document); var xml = node.firstChild; var id = xml.getAttribute('id'); var myMenuToAdd; child = node.firstChild.firstChild; while(child != null){ // get sibling BEFORE parent changes childSibling = child.nextSibling; if(child.nodeType==1){ // alert(window.printNode(child)); myMenuToAdd = parent.document.F4B.getSVGDocument().getElementById(PlanningCanvas); myMenuToAdd.appendChild(child); } child = childSibling; } }else { alert(something went wrong!); } } [Non-text portions of this message have been removed] Yahoo! Groups Sponsor ~-- Great things are happening at Yahoo! Groups. See the new email design. http://us.click.yahoo.com/TISQkA/hOaOAA/yQLSAA/1U_rlB/TM ~- - To unsubscribe send a message to: [EMAIL PROTECTED] -or- visit http://groups.yahoo.com/group/svg-developers and click edit my membership Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/svg-developers/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[svg-developers] getURL/XMLHTTP
I'm stuck trying to communicate between two different svg docs embedded in an html doc in IE. I want to capture an id in say svgDoc1, use it to query a database, build some svg, and append the result into svgDoc2. I can't get the getURL to work since it appears not work when called from js referenced in the html doc. So I have attempted to use req = new ActiveXObject(Microsoft.XMLHTTP);. I can get the XML doc with req.responseXML, but I have failed to figure out how to insert it into svgDoc2 in a similar fashion as for example, myMenuToAdd.appendChild(child) where myMenuToAdd = document.F4B.getSVGDocument().getElementById(PlanningCanvas);. If I could, which I can't, do away with embedding in html doc and write it as one big svg document, this would be a simple task. Can anyone suggest how I might achieve this? Thank you. Sean Yahoo! Groups Sponsor ~-- Check out the new improvements in Yahoo! Groups email. http://us.click.yahoo.com/6pRQfA/fOaOAA/yQLSAA/1U_rlB/TM ~- - To unsubscribe send a message to: [EMAIL PROTECTED] -or- visit http://groups.yahoo.com/group/svg-developers and click edit my membership Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/svg-developers/ * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/