[svg-developers] Hi all. How can I get version SVG viewer using JavaScript?

2005-11-29 Thread Nikolya Patskov
Hi all. How can I get version SVG viewer using JavaScript?
Nikolya






 Yahoo! Groups Sponsor ~-- 
Get fast access to your favorite Yahoo! Groups. Make Yahoo! your home page
http://us.click.yahoo.com/dpRU5A/wUILAA/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] Hi all. How can I get version SVG viewer using JavaScript?

2005-11-29 Thread Jeff Rafter
 Hi all. How can I get version SVG viewer using JavaScript?

By downloading one?

This question is exceedingly vague. Batik, Firefox, Adobe, 
SharpVectorGraphics, Ksvg, Ksvg2 are just some of the freeware ones. I 
am sure that there are others. But I have no idea what platform(s) you 
are targeting, whether or not you want a control or browser, editor 
ability, etc.

All the best,
Jeff Rafter


 Yahoo! Groups Sponsor ~-- 
Get fast access to your favorite Yahoo! Groups. Make Yahoo! your home page
http://us.click.yahoo.com/dpRU5A/wUILAA/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] Hi all. How can I get version SVG viewer using JavaScript?

2005-11-29 Thread Martyn Eggleton
Ok Nikolya can correct me if i'm wrong and if I am I still would like 
the answer to this version.

How can I find out the version of the SVG viewer my svg is being viewed 
through using javascript?

Personally I'd also like to be find what viewer i'm using (ie FF, ASV etc.)?

Also as feature detection is better than browser detection does any one 
have any examples that use hasFeature successfully.

Jeff Rafter wrote:
  Hi all. How can I get version SVG viewer using JavaScript?

 By downloading one?

 This question is exceedingly vague. Batik, Firefox, Adobe,
 SharpVectorGraphics, Ksvg, Ksvg2 are just some of the freeware ones. I
 am sure that there are others. But I have no idea what platform(s) you
 are targeting, whether or not you want a control or browser, editor
 ability, etc.

 All the best,
 Jeff Rafter


 -
 To unsubscribe send a message to: 
 [EMAIL PROTECTED]
 -or-
 visit http://groups.yahoo.com/group/svg-developers and click edit my 
 membership
 



 SPONSORED LINKS
 Computer internet security 
 http://groups.yahoo.com/gads?t=msk=Computer+internet+securityw1=Computer+internet+securityw2=Computer+internet+businessw3=Computer+internet+accessw4=Computer+internet+privacy+securitiesw5=Computer+internet+helpw6=How+to+format+a+computer+hard+drivec=6s=205.sig=w4GASPpHpfjlcIDIN2xRhg
  
   Computer internet business 
 http://groups.yahoo.com/gads?t=msk=Computer+internet+businessw1=Computer+internet+securityw2=Computer+internet+businessw3=Computer+internet+accessw4=Computer+internet+privacy+securitiesw5=Computer+internet+helpw6=How+to+format+a+computer+hard+drivec=6s=205.sig=dpAOB83S_nCZvZFKN0XRUw
  
   Computer internet access 
 http://groups.yahoo.com/gads?t=msk=Computer+internet+accessw1=Computer+internet+securityw2=Computer+internet+businessw3=Computer+internet+accessw4=Computer+internet+privacy+securitiesw5=Computer+internet+helpw6=How+to+format+a+computer+hard+drivec=6s=205.sig=fhtetF4vbEFSW0XjnGnejw
  

 Computer internet privacy securities 
 http://groups.yahoo.com/gads?t=msk=Computer+internet+privacy+securitiesw1=Computer+internet+securityw2=Computer+internet+businessw3=Computer+internet+accessw4=Computer+internet+privacy+securitiesw5=Computer+internet+helpw6=How+to+format+a+computer+hard+drivec=6s=205.sig=5bexR8A8GfBSIHBvJTxCRg
  
   Computer internet help 
 http://groups.yahoo.com/gads?t=msk=Computer+internet+helpw1=Computer+internet+securityw2=Computer+internet+businessw3=Computer+internet+accessw4=Computer+internet+privacy+securitiesw5=Computer+internet+helpw6=How+to+format+a+computer+hard+drivec=6s=205.sig=7LG_5Hx-MR-G7MxElbtK0Q
  
   How to format a computer hard drive 
 http://groups.yahoo.com/gads?t=msk=How+to+format+a+computer+hard+drivew1=Computer+internet+securityw2=Computer+internet+businessw3=Computer+internet+accessw4=Computer+internet+privacy+securitiesw5=Computer+internet+helpw6=How+to+format+a+computer+hard+drivec=6s=205.sig=5WTDsIm1jp1Q2b1NP3JxEw
  



 
 YAHOO! GROUPS LINKS

 *  Visit your group svg-developers
   http://groups.yahoo.com/group/svg-developers on the web.

 *  To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
   mailto:[EMAIL PROTECTED]

 *  Your use of Yahoo! Groups is subject to the Yahoo! Terms of
   Service http://docs.yahoo.com/info/terms/.


 




[Non-text portions of this message have been removed]



 Yahoo! Groups Sponsor ~-- 
Get fast access to your favorite Yahoo! Groups. Make Yahoo! your home page
http://us.click.yahoo.com/dpRU5A/wUILAA/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] Hi all. How can I get version SVG viewer using JavaScript?

2005-11-29 Thread Jeff Rafter
 How can I find out the version of the SVG viewer my svg is being viewed 
 through using javascript?
 
 Personally I'd also like to be find what viewer i'm using (ie FF, ASV etc.)?
 
 Also as feature detection is better than browser detection does any one 
 have any examples that use hasFeature successfully.

Aha, I see I was misreading-- sorry for my curt reply. Viewer/browser 
detection is pretty tough to get exactly right, but you can get close-- 
here are some of the basics (stolen from Doug Schepers' SMILscript):

try
{
   if ( -1 != getSVGViewerVersion().indexOf('ASV') )
   {
  return;
   }
}
catch(er) {}


This will raise an exception in Firefox because getSVGViewerVersion does 
not exist. In Adobe it will return various version strings containing 
'ASV'. I am not sure how to test this in Opera and Batik. I can look 
into that if needed.

Cheers,
Jeff Rafter


 Yahoo! Groups Sponsor ~-- 
Get fast access to your favorite Yahoo! Groups. Make Yahoo! your home page
http://us.click.yahoo.com/dpRU5A/wUILAA/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] Hi all. How can I get version SVG viewer using JavaScript?

2005-11-29 Thread Edgar Valarezo
Hi. I use this code for IE/ASV and Firefox:

!-- script to check SVG availability and version --
!-- MOST OF THIS IS FROM SUN and another guy I don't
remember. Sorry. --
!-- Check if browsers have SVG support and record if
we need to use
 VBScript detection method if the number of MIME
types is 0. --
script language=JavaScript1.1
// Variable to keep track of user's SVG support
var hasSVGSupport = false;
var svgVersion;
var svgCtl;

// Variable to indicate whether we need to use
VBScript method to
// detect SVG support
var useVBMethod = false;

// Internet Explorer returns 0 as the number of MIME
types,
// so this code will not be executed by it. This is
our indication
// to use VBScript to detect SVG support.
if (navigator.mimeTypes != null 
navigator.mimeTypes.length  0) {

var plugin = 0;

if (navigator.mimeTypes 
navigator.mimeTypes[image/svg+xml]){
plugin =
navigator.mimeTypes[image/svg+xml].enabledPlugin;
}

if (plugin) {
hasSVGSupport = true;
svgVersion = plugin.description;
}
else{
// Firefox 1.5+ has SVG native support. Checking
with a user agent match.
// If there is a more refined way to do this,
please tell me.

var xua = window.navigator.userAgent;
var xpos_firefox =
xua.toLowerCase().indexOf('firefox');

if(xpos_firefox != -1){

xversion =
xua.substr(xpos_firefox).split('/')[1].split('.');

var xnum_ver = parseInt(xversion[0]) * 100 +
parseInt(xversion[1]);

if(xnum_ver = 105){
hasSVGSupport = true;
svgVersion = xversion.join('.');
}
}
}
} 
else {
useVBMethod = true;
}
/script

!-- Visual Basic Script to detect support of Adobe
SVG plugin. This
 code is not run on browsers which report they have
MIME types, and
 it is also not run by browsers which do not have
VBScript support.
 --
script language=VBScript
On Error Resume Next
If useVBMethod = true Then
Set svgCtl  = CreateObject(Adobe.SVGCtl)
svgVersion = svgCtl.getSVGViewerVersion()
hasSVGSupport = IsObject(svgCtl)
End If
/script


SCRIPT language=JavaScript1.2
if (!hasSVGSupport) {
location.href =
location.href.replace(location.href.split('/').pop(),
'error_plugin_svg.htm');
}
else{ //that is only for testing:
alert('SVG SUPPORT!\nsvgVersion: ' + svgVersion);
}
/script

I hope this help you.


 --- Nikolya Patskov [EMAIL PROTECTED] escribió:

 Hi all. How can I get version SVG viewer using
 JavaScript?
 Nikolya
 
 
 
 
 


__
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis! 
Regístrate ya - http://correo.espanol.yahoo.com/ 


 Yahoo! Groups Sponsor ~-- 
Most low income households are not online. Help bridge the digital divide today!
http://us.click.yahoo.com/I258zB/QnQLAA/TtwFAA/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] Hi all. How can I get version SVG viewer using JavaScript?

2005-11-29 Thread Edgar Valarezo
I hope this can be a bit more clear:


!-- Script to check SVG availability and version --
!-- Detect IE/ASV and Firefox SVG support --
!-- MOST OF THIS IS FROM SUN and another guy I don't 
 remember. Sorry. --
!-- Check if browsers have SVG support and record if 
 we need to use VBScript detection method if the 
 number of MIME types is 0. --
 
«script language=JavaScript1.1»
   // Variable to keep track of user's SVG support
   var hasSVGSupport = false;
   var svgVersion;
   var svgCtl;

   // Variable to indicate whether we need to use 
   // VBScript method to detect SVG support
   var useVBMethod = false;

   // Internet Explorer returns 0 as the number of 
   // MIME types, so this code will not be executed 
   // by it. This is our indication to use VBScript 
   // to detect SVG support.
   if (navigator.mimeTypes != null 
   navigator.mimeTypes.length  0) {
  var plugin = 0;
  
  if (navigator.mimeTypes 
  navigator.mimeTypes[image/svg+xml]){
 plugin =
navigator.mimeTypes[image/svg+xml].enabledPlugin;
  }
 
  if (plugin) {
 hasSVGSupport = true;
 svgVersion = plugin.description;
  }
  else{
 // Firefox 1.5+ has SVG native support. 
 //  Checking with a user agent match.
 // If there is a more refined way 
 //  to do this, please tell me.
 
 var xua = window.navigator.userAgent;
 var xpos_firefox 
= xua.toLowerCase().indexOf('firefox');

 if(xpos_firefox != -1){

xversion =
xua.substr(xpos_firefox).split('/')[1].split('.');

var xnum_ver = parseInt(xversion[0]) * 100
+ parseInt(xversion[1]);

if(xnum_ver = 105){
   hasSVGSupport = true;
   svgVersion = xversion.join('.');
}
 }
  }
   } 
   else {
  useVBMethod = true;
   }
/script

!-- Visual Basic Script to detect support of Adobe
 SVG plugin. This code is not run on browsers 
 which report they have MIME types, and it is 
 also not run by browsers which do not have 
 VBScript support. --
«script language=VBScript»
   On Error Resume Next
   If useVBMethod = true Then
  Set svgCtl  = CreateObject(Adobe.SVGCtl)
  svgVersion = svgCtl.getSVGViewerVersion()
  hasSVGSupport = IsObject(svgCtl)
   End If
/script


«script language=JavaScript1.2»
   if (!hasSVGSupport) {
  location.href =
location.href.replace(location.href.split('/').pop(),
'svgerror.htm');
   }
   else{ //that is only for testing:
  alert('SVG SUPPORT!\nsvgVersion: '+svgVersion);
   }
/script


__
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis! 
Regístrate ya - http://correo.espanol.yahoo.com/ 


 Yahoo! Groups Sponsor ~-- 
AIDS in India: A lurking bomb. Click and help stop AIDS now.
http://us.click.yahoo.com/9QUssC/lzNLAA/TtwFAA/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/