Inkscape.org
Beginners' Questions Simple Question: I can't added onclick or onmouseover links to object that work in Chrome et al
  1. #1
    Henry Jakubowski Henry Jakubowski @hjakubowski

    Hi all,  

    I have perhaps 500+ images for a biochemistry book I am writing.  I can easily make SVG files and load them in Inkscape.  I group all atoms in a molecule into an object, right click the object and go to object properties and then add a url to onclick or onmouseover and then select Set.  After saving I pull up the image in Chrome et al and no response on either mouseover or click.  On selecting Edit, XML editor, the urls don't show up.  I tried right clicking and Create a Link and nothing works in viewing in Chrome.  I am totally new to Inkscape and I think I must be leaving out only 1 simple step.  I'm not a coder just a user and with 1 fix I'm set to go. Thanks

    Henry J

  2. #2
    Henry Jakubowski Henry Jakubowski @hjakubowski

    Hi all again,

    I did see that the urls for the links were added when I opened the svg file in WordPad.

  3. #3
    Tyler Durden Tyler Durden @TylerDurden

    Working here:

    • v.92.2 Chrome
    • v1.01 Firefox

    Tooltips appear if text is set in the Title field of object attributes.

     

    Feel free to share an example svg file.

  4. #4
    Henry Jakubowski Henry Jakubowski @hjakubowski

    Hi Tyler

    Here is a link to my SVG file on my onedrive acct:

    https://1drv.ms/u/s!ApsALXVJXO7OiO45GRv-9HNVZ5dMuQ?e=gLMeE5

    I grouped the top molecule (Gln) in the image into an object and then tried to add links for onclick and onmouseover.  Here is the link I tried to add:

    https://pubchem.ncbi.nlm.nih.gov/compound/5961

    I'm working on a project to make all Chem books in the Chemistry undergrad curriculum free online.

    Thanks

    Henry

  5. #5
    inklinea inklinea @inklinea⛰️

    I am a hobby programmer only but ...

    From what I can see the <a> xlink is working fine, its just that the link is activated by click on a part of the path which is very skinny. Carefully position your mouse on on the the black bond lines, it should work.

    As for the mouseclick event, that usually refers to the execution of a piece of javascript code. I don't think it will do anything if you just stick a url in there.

    onclick="window.open('https://pubchem.ncbi.nlm.nih.gov/compound/5961','_blank')"

     

     

Inkscape Inkscape.org Inkscape Forum Beginners' Questions Simple Question: I can't added onclick or onmouseover links to object that work in Chrome et al