Dear all, I write a simple asp & script for dynamic load SVG from database. following is the asp & script. Everything is work fine. But when I try to load a lager size SVG (ex: 1400px*1600px), then some part of graphic will be cut. Did anyone can tell me what's going on?
Daniel Horng ************************************************************ ************************************************************ filename: test.asp ************************************************************ ************************************************************ <[EMAIL PROTECTED] codepage=65001%> <% Option Explicit Response.Buffer=true Response.Expires = -1 Session.Codepage = 65001 %> <html> <head> <script language='Jscript'> var xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); function GetSVG() { xmlHttp.open("GET","ws_GenSVGData.asp?Key=1", true); xmlHttp.send(); xmlHttp.onreadystatechange = Function("GetSVGFinish()"); } function GetSVGFinish() { if (xmlHttp.readyState != 4) {return;} var embSVG = document.embeds["objSVG"]; var SVGDoc = embSVG.getSVGDocument(); var objFrag = embSVG.window.parseXML(xmlHttp.responseText,SVGDoc); SVGDoc.rootElement.appendChild(objFrag.firstChild); } </script> </head> <body> <button onclick='jscript:GetSVG();'> Load SVG</button><p> <EMBED ID='objSVG' SRC="blank.svg" TYPE="image/svg-xml" WIDTH="100%" HEIGHT="100%" LUGINSPAGE="http://www.adobe.com/svg/viewer/install/"> </body> </html> ************************************************************ ************************************************************ filename:ws_GenSVGData.asp ************************************************************ ************************************************************ <[EMAIL PROTECTED] codepage=65001%> <% Option Explicit Response.Buffer=true Response.Expires = -1 Session.Codepage = 65001 dim strConn,cnnDB,strSQL,strKey,rst1 strConn = "Provider=SQLOLEDB.1;User ID=sa;Password=;Persist Security Info=True;Initial Catalog=MyTestDB;Data Source=(local)" set cnnDB = Server.CreateObject("ADODB.Connection") cnnDB.Open strConn strKey = trim(Request("Key")) strSQL = "SELECT SVGData FROM MyTable WHERE KeyID = " & strKey set rst1 = cnnDB.Execute(strSQL) Response.Write rst1("SVG").value %> ************************************************************ ************************************************************ filename: Blank.svg ************************************************************ ************************************************************ <?xml version="1.0" standalone="no"?> <svg xmlns:xlink="http://www.w3.org/1999/xlink"></svg> ************************************************************ ************************************************************ ----- 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/