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]>
>        
>     *  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=12hiitarg/M=362335.6886445.7839731.1510227/D=groups/S=1706030389:TM/Y=YAHOO/EXP=1124205840/A=2894361/R=0/SIG=13jmebhbo/*http://www.networkforgood.org/topics/education/digitaldivide/?source=YAHOO&cmpgn=GRP&RTP=http://groups.yahoo.com/";>In
 low income neighborhoods, 84% do not own computers. At Network for Good, help 
bridge the Digital Divide!</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