How to link to another SVG by script ?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

How to link to another SVG by script ?

hugues parvillers
Hello,

Could you tell me how to link by script from a svg
file to another one ?

For example, I propose several scales into a select
list.
After the user change the selected scale , the map
should directly load the url set by script.

Tks in advance for your coop,

H/P
France

Salutations,
 
Hugues PARVILLERS
AgdF S.A., groupe Cegedim
 
Mob : (+33) 6 81 59 25 03 / Skype : parvillers_h
 
PS: attention mel ? utiliser pour toute correspondance pro
 




       

       
               
__________________________________________________________________
D?couvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails !
Cr?ez votre Yahoo! Mail sur http://fr.mail.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to link to another SVG by script ?

Tonny Kohar
Hi,

On Sat, 2005-05-07 at 00:54 +0200, hugues parvillers wrote:
> Hello,
>
> Could you tell me how to link by script from a svg
> file to another one ?
>
> For example, I propose several scales into a select
> list.
> After the user change the selected scale , the map
> should directly load the url set by script.

I think you could use
<a xlink:href="something.svg">
        <someSVGElement />
</a>
to do the trick.

For more info, check the SVG spec especially the linking part

Regards
Tonny Kohar
--
Sketsa
SVG Graphics Editor
http://www.kiyut.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to link to another SVG by script ?

hugues parvillers
In reply to this post by hugues parvillers
Hi tonny,

I would like to force the new URL inside a script .
Not
by an A action .

Tks

H/P

--- Tonny Kohar <[hidden email]> a ?crit:

> Hi,
>
> On Sat, 2005-05-07 at 00:54 +0200, hugues parvillers
> wrote:
> > Hello,
> >
> > Could you tell me how to link by script from a svg
> > file to another one ?
> >
> > For example, I propose several scales into a
> select
> > list.
> > After the user change the selected scale , the map
> > should directly load the url set by script.
>
> I think you could use
> <a xlink:href="something.svg">
> <someSVGElement />
> </a>
> to do the trick.
>
> For more info, check the SVG spec especially the
> linking part
>
> Regards
> Tonny Kohar
> --
> Sketsa
> SVG Graphics Editor
> http://www.kiyut.com
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [hidden email]
> For additional commands, e-mail:
> [hidden email]
>
>


       

       
               
__________________________________________________________________
D?couvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails !
Cr?ez votre Yahoo! Mail sur http://fr.mail.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to link to another SVG by script ?

Andreas Neumann
hugues parvillers wrote:

>Hi tonny,
>
>I would like to force the new URL inside a script .
>Not
>by an A action .
>  
>
you can dynamically update the xlink:href attribute of a previously
existing <a /> element  like any other attribute, with
.setAttrributeNS() - just use the xlink namespace for that purpose. Is
that sufficient for your purpose?

Andreas



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to link to another SVG by script ?

Andreas Neumann
In reply to this post by hugues parvillers
Hi again,

I created a selectionlist javascript that you might want to use for that
purpose.

http://www.carto.net/papers/svg/gui/selectionlist/ - just extend it with
<a /> elements and add your links.

Andreas

hugues parvillers wrote:

>Hello,
>
>Could you tell me how to link by script from a svg
>file to another one ?
>
>For example, I propose several scales into a select
>list.
>After the user change the selected scale , the map
>should directly load the url set by script.
>
>Tks in advance for your coop,
>
>H/P
>France
>
>Salutations,
>
>Hugues PARVILLERS
>AgdF S.A., groupe Cegedim
>
>Mob : (+33) 6 81 59 25 03 / Skype : parvillers_h
>
>PS: attention mel ? utiliser pour toute correspondance pro
>
>
>
>
>
>
>
>
>
>__________________________________________________________________
>D?couvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails !
>Cr?ez votre Yahoo! Mail sur http://fr.mail.yahoo.com/
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [hidden email]
>For additional commands, e-mail: [hidden email]
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to link to another SVG by script ?

thomas.deweese
In reply to this post by hugues parvillers
Hi Hugues,

hugues parvillers wrote:

> I would like to force the new URL inside a script .
> Not by an A action .

    So it's easy to do this from your Java Application:
        canvas.setURI(...).

    If you _really_ need to do this with JavaScript you have
a few options:

     1) Bind a custom function/object into the JavaScript
environment:

        UpdateManager um = canvas.getUpdateManager();
         RunnableQueue rq;
         rq = updateManager.getUpdateRunnableQueue();
         rq.invokeLater(new Runnable() {
                 UpdateManager um = updateManager;
                 public void run() {
                     ScriptingEnvironment scriptEnv;
                     scriptEnv = um.getScriptingEnvironment();
                     Interpreter interp;
                     interp    = scriptEnv.getInterpreter();
                     interp.bindObject("myObject", myObject);
                }
        }

     2) You should be able to create a 'fake' click event
on a link object (most of the stuff in initMouseEvent can
be faked):

        MouseEvent me = doc.createEvent("MouseEvents");
        me.initMouseEvent(String typeArg,
                               boolean canBubbleArg,
                               boolean cancelableArg,
                               AbstractView viewArg,
                               int detailArg,
                               int screenXArg,
                               int screenYArg,
                               int clientXArg,
                               int clientYArg,
                               boolean ctrlKeyArg,
                               boolean altKeyArg,
                               boolean shiftKeyArg,
                               boolean metaKeyArg,
                               short buttonArg,
                               EventTarget relatedTargetArg);
        EventTarget et = doc.getElementById("childOfA");
        et.dispatchEvent(me);

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: How to link to another SVG by script ?

Fabien Todescato
In reply to this post by hugues parvillers
Hi Hughes,

I have a similar application where I scriptically updates the xlink:href
attribute of an svg:use node.

Cheers

hugues parvillers wrote:

>Hello,
>
>Could you tell me how to link by script from a svg
>file to another one ?
>
>For example, I propose several scales into a select
>list.
>After the user change the selected scale , the map
>should directly load the url set by script.
>
>Tks in advance for your coop,
>
>H/P
>France
>
>Salutations,
>
>Hugues PARVILLERS
>AgdF S.A., groupe Cegedim
>
>Mob : (+33) 6 81 59 25 03 / Skype : parvillers_h
>
>PS: attention mel ? utiliser pour toute correspondance pro
>
>
>
>
>
>
>
>
>
>__________________________________________________________________
>D?couvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails !
>Cr?ez votre Yahoo! Mail sur http://fr.mail.yahoo.com/
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [hidden email]
>For additional commands, e-mail: [hidden email]
>
>
>
>
>  
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

ft.vcf (168 bytes) Download Attachment