[pmwiki-users] displaying coordinates of mouse click
5ko at 5ko.fr
Thu Jun 6 04:47:32 CDT 2013
Mark Lee writes:
> site is at Wikidot, and one of the things I did there is shown below:
> If you click on the picture, the click location is captured behind the
> scenes, then X and Y coordinates are displayed in a couple text boxes.
> Here is the code I used in Wikidot. Can this be done in PMWiki?
Yes, it can.
Create a form with the required form fields, see
Create a custom markup for the <canvas> element, see
http://www.pmwiki.org/wiki/PmWiki/CustomMarkup or start with an existing
recipe like one of the Flash, Video or Java applet recipes and change it to
produce your canvas HTML.
To insert stuff in the HTML <head>...</head> section, add the stuff as an
element to the $HTMLHeaderFmt, something like:
$HTMHHeaderFmt['my-recipe'] = <<<EOF
where $PubDirUrl is normally the url address of your pub/ directory (and
PmWiki guesses it in most cases.
More information about the pmwiki-users