[pmwiki-users] php & javascript integration

Hans hans.bracker at googlemail.com
Tue Aug 22 15:06:56 CDT 2006

On 22/08/06, Thomas -Balu- Walter <list+pmwiki-users at b-a-l-u.de> wrote:
> On Tue, Aug 22, 2006 at 10:32:09AM +0100, Hans wrote:
> > So is it preferable to have no accesskeys at all for the buttons
> > and have them displayed also on first visit for javascript enabled browsers,
> > or have accesskeys, but the buttons don't show at first visit to the site,
> > only on the second page and later.
> Embed the buttons in the HTML, but make them display: none; and switch
> back to display: block; when using Javascript?

I tried and failed with this. Perhaps because the buttons are
generated by markup in the page, they are not hardcoded into the

So I reached a compromise:
On first site visit when no javascript cookie is present, javascript
is setting the javascript cookie, and the buttons are displayed by
Then on subsequent pages php sees the cookie and displays the buttons,
not the javascript (the javascript still does all the sizing and sets
a fontsize cookie).
This way I get buttons right from the start, and they work by clicking on them,
and from page two onwards I also get accesskeys for the buttons.

I will put this into the next skin updates.
Just have to check if it is also suitable for the Cookbook/FontSizer recipe.



More information about the pmwiki-users mailing list