Hi,

          i just have a simple doubt in SVG.


1. <body scroll="no">
       <embed src="WorldView.svg" type="image/svg+xml" width="100%"
height="100%        
                           
"pluginspage="http://www.adobe.com/svg/viewer/install/main.html";>
       <div id="infoDiv"></div>
 </body>
-------------------------> here i am including the SVG "WorldView"
document in the XHTML page.

2. <script type="text/javascript"  language="javascript"
src="ClientEventHandler.js"> </script>
    <script type="text/javascript"  language="javascript"
src="XMLHttpRequest.js"> </script>

------------------> i have included these 2 java script files in the
same XHTML page which have functions 

for Init n getTrueCoords defined in SVG document.


3. <svg xmlns="http://www.w3.org/2000/svg"; onload='Init(evt)'
onmousemove='GetTrueCoords(evt); 

ShowTooltip(evt, true)'
     onmouseout='ShowTooltip(evt, false)'>

 <g id='ToolTip' opacity='1.0' display='none' pointer-events='none'>

     <rect id='tipbox' x='0' y='5' width='100' height='20' rx='4'
ry='4' fill='White' stroke='Black'/>
     <text id='tipText' x='5' y='20' font-family='Times New Roman'
font-size='13'>
         <tspan id='tipTitle' x='5' font-weight='bold' fill='Blue'>
</tspan>
     </text>

 </g>

-------------> here is the code in "WordView" svg document.

4. In the first JS file "ClientEventHandler.js" i have the funtions
Init, GetTrueCoords(evt) ..... so on. 

now when a user preform some action like click an element say circle
shape of SVG document, this JS script 

makes AJAX (XHR) requests n comes with an XML with some data, which i
will parse n update the SVG document 

dynamically. Since this SVG is embedded in the HTML page, the page
shows the necessary updated data.

Now my doubt is why to serve HTML page when user starts from the
browser rather than the SVG document 

directly.

for that i need to include the 2 external javascript files in the SVG
document so that i directly invoke 

the SVG document from the browser. i just tried to do like this but it
doesnt work.

<svg xmlns="http://www.w3.org/2000/svg"; onload='Init(evt)'
onmousemove='GetTrueCoords(evt); 

ShowTooltip(evt, true)'
     onmouseout='ShowTooltip(evt, false)'>

<script type="text/javascript"  language="javascript"
src="ClientEventHandler.js"> </script>
<script type="text/javascript"  language="javascript"
src="XMLHttpRequest.js"> </script>

<g id='ToolTip' opacity='1.0' display='none' pointer-events='none'>

     <rect id='tipbox' x='0' y='5' width='100' height='20' rx='4'
ry='4' fill='White' stroke='Black'/>
     <text id='tipText' x='5' y='20' font-family='Times New Roman'
font-size='13'>
         <tspan id='tipTitle' x='5' font-weight='bold' fill='Blue'>
</tspan>
     </text>

 </g>

</svg>

but here it says unable to find Init n other functions.

I also want suggestions that which is the good method to either embed
SVG in HTML page or directly use SVG 

alone for web applications.

Tnks for suggestions n comments,

Byee,
Pramod.





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Home is just a click away.  Make Yahoo! your home page now.
http://us.click.yahoo.com/DHchtC/3FxNAA/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/
 


Reply via email to