<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<font size="4">In my desktop QGIS I have a short Python script that
opens an HTML page including arguments (attributes of the selected
feature). When I use QGIS2web to put the project on the web, I
would like the user to trigger that action when he/she clicks on a
feature. I would be grateful for advice on how to do that.<br>
=========================<br>
#This is the script for Action "showPhoto"<br>
import webbrowser<br>
host = "promPics.rf.gd"<br>
cName = "[%"common name"%]"<br>
lName = "[%"latin name"%]"<br>
picture = "[%"picture"%]"<br>
theURL = "http://" + host + "/?"<br>
theURL = theURL + "cName=" + cName + "&"<br>
theURL = theURL + "lName=" + lName + "&"<br>
theURL = theURL + "photo=" + picture <br>
webbrowser.open(theURL)<br>
=====================<br>
If you're interested, you can see an older, two-click, approach at<br>
BrooklynProm.epizy.com <br>
[Garden B only]<br>
<br>
<br>
<br>
</font>
</body>
</html>