Hi Holger,

THanks for your help.
As you said, the approach you suggested is only work in firefox 1.5 
(deerpark alpha2). Anyway, I tried to install it to my firefox, which 
is firefox 1.0.6 and obviously it shows that this extension only can 
be used in Firefox 1.0+ to 1.1. (1.0+?? Then I suppose my firefox 
1.0.6 shoud be alright :-))

Anyway, I thought the version I am having now is the latest and I 
don't really dare to install firefox 1.5.

I was looking through your codes in the .js file and trying to 
understand what is going on, as I am quite new in programming and web 
development. Talking about adding an eventlistener to the tabbrowser 
element and use hth contentDocument to access to the loaded file, 
could you give me some ideas on which are those codes involved in 
this case?

Thanks,
S.

--- In [email protected], Holger Will <[EMAIL PROTECTED]> 
wrote:
> samcctan schrieb:
> 
> > Hi Holger,
> >
> > What do you mean "there is no way to communicate between ASV and
> > firefox"?
> >
> > I am doing a project to improve the accessibility of the graphics 
to
> > the blind and visually impaired people by using some assistive 
devices,
> > such as audio and haptic. I am now concentrating on SVG graphics,
> > especially for graphs. So, I am planning to have a plugin for the
> > browsers. At the moment, we are concentrating on creating a 
firefox
> > extension, but eventually we would like to have a plugin for IE 
as well.
> >
> > Anyway, I wrote a JavaScipt to extract the desired and important 
data
> > and information from a SVG file, by using getAttribute,
> > getElementsByTagName and so on. It is working at the moment but 
only if
> > I read the SVG file which saved in the same directory in my local
> > machine.
> >
> > This is snippet of my Code:
> >
> > function init(){
> >     readXML(SVGBarGrap.svg");
> > }
> > function readXML(url){
> >     if (window.XMLHttpRequest) {
> >         req = new XMLHttpRequest();
> >         req.overrideMimeType ("text/xml");
> >         req.onreadystatechange = processReqChange;
> >         req.open("GET", url, true);
> >         req.send(null);
> >     } else if (window.ActiveXObject) {
> >        req = new ActiveXObject("Microsoft.XMLHTTP");
> >         if (req) {
> >             req.onreadystatechange = processReqChange;
> >             req.open("GET", url, true);
> >             req.send();
> >         }
> >     }
> > }
> > function processReqChange() {
> >    if (req.readyState == 4 && req.responseXML) {
> >       var resp = req.responseXML;
> >         parseSVGFile(resp);
> >    }
> > }
> >
> > But now, I would like to create this plugin which can extract the 
data
> > and information from any of the SVG graph from any of the 
webpage. But
> > I am not too sure how could I do that now. My idea is: When the 
user
> > browse through a webpage, and found a SVG Graph on one of the 
webpage,
> > then he will clock on a link to "view SVG". Then I suppose a new 
window
> > with SVG graph will pop up. I would then like to have my plugin 
to work
> > at this point, by directing my audio and haptic to represent the
> > content of the graph.
> >
> > But I don't have any idea to read a file from a remote server. Or 
I
> > should save the file on to the user's machine, but I am wondering 
can
> > JavaScript does that....
> >
> > Is all these make any sense?
> >
> > Many Thanks,
> >
> > Sam
> >
> >
> 
> yes i think i get it now. you are writing an extension , so i think 
> there is no reason you should load any document,
> since the documents you want to handle, are allready loaded by the 
browser !
>  so you could do the following:
> you can add an eventlistener to the <tabbrowser> element.
> you can then use the contentDocument  property of said tabbrowser 
> element to gain access to the currently loaded file.
> or you can iterate through all embed and object elements and get a 
> reference to the included documents.
> 
> this is the basic framework i used to implement my zoom and pan 
extension.
> 
> http://www.treebuilder.de/zoomandpan/index.htm
> 
> you can look at the code to find out how its done by downloading 
the 
> .xpi , renaming it to .zip unzip it
> change to the unziped folder, open the chrome folder, rename 
> svgdevtools.jar to svgdevtools.zip , unzip it,
> change to chrome/content and look at the svgdevtools.js .
> 
> but note that all this will only work in firefox 1.5 (deerpark 
alpha2).
> 
> hth
> Holger
> 
> 
> 
> >
> >
> >
> > -----
> > 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
> >
> >     *  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]
subject=Unsubscribe>
> >        
> >     *  Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> >       Service <http://docs.yahoo.com/info/terms/>.
> >
> >
> > ------------------------------------------------------------------
------
> >





------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12hn1v9o0/M=362131.6882499.7825260.1510227/D=groups/S=1706030389:TM/Y=YAHOO/EXP=1124213590/A=2889191/R=0/SIG=10r90krvo/*http://www.thebeehive.org
">Get Bzzzy! (real tools to help you find a job) Welcome to the Sweet Life 
- brought to you by One Economy</a>.</font>
--------------------------------------------------------------------~-> 

-----
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