Does Inkscape support popup windows?

Asked by Jide Odubiyi on 2017-12-07

I would like a pop up window to display either upon clicking or mousing over an object. Presently, I can use the href to display another window, perform some actions and return to the interface. I would like an option where I do not leave the current interface, pop up a window, ask for input from the user, close the pop up window and return to the interface.

Question information

Language:
English Edit question
Status:
Solved
For:
Inkscape Edit question
Assignee:
No assignee Edit question
Solved by:
Hachmann
Solved:
2017-12-08
Last query:
2017-12-08
Last reply:
2017-12-08
Hachmann (marenhachmann) said : #1

Sorry, I don't understand well enough to be able to help.

What is your goal? Can you explain what exactly you want this for? Are you writing an extension? Are you using the SVG file in a browser?

Jide Odubiyi (lajide) said : #2

Thanks. Yes I am using the SVG file in a browser.
Using Inkscape, I have been able to create an object and link that object to a browser page when the user clicks on the object. When the user clicks on the object, the user is sent to a browser page and exits the current SVG interface in a browser. After answering some specific questions, the user is returned to the SVG interface in the browser.
What I'd like to do is not to leave the SVG browser window. May be it is possible to use the browser capabilities to retain the current interface and display the new browser. I will explore that option. If that option does not work, then I'd like to know if upon selecting the SVG object in a browser, a pop up window can be generated. Thanks again.

Best Hachmann (marenhachmann) said : #3

Ah, okay.

So, non-interactive hover texts (titles) can be added to any object in an SVG image, using Inkscape (right-click > Object Properties > Title). They can provide descriptions, but not more.

If you want anything interactive that deals with user choices and computes some value from those, you will need to use Javascript.
You can add Javascript in Inkscape to an object with right-click > Object Properties > Interactivity, or you can insert Javascript into a file from File > Document Properties > Scripting.

As for how to use Javascript to generate a pop-up and do something with user entries inside, please refer to Javascript tutorials.

You could also embed an iframe into the SVG, and use JS to toggle that iframe's visibility , then you could ask your questions inside the SVG. Not sure how well this works in different browsers, would need to be tried out.

Jide Odubiyi (lajide) said : #4

Thanks Hachmann, that solved my question.