[pmwiki-users] php & javascript integration

H. Fox haganfox at users.sourceforge.net
Tue Aug 22 21:25:26 CDT 2006

On 8/22/06, Hans <hans.bracker at googlemail.com> wrote:
> I invite your opinions on this development problem:
> For the javascript based fontsizer I employed for Triad skin etc
> the text sizing buttons (links) are written by the javascript.
> This avoids them showing when javascript is disabled/not present.
> Now I like to add accesskey behaviour to the buttons,
> but this does not work when they are written to html via javascript.
> If I write them via php script accesskeys work, but I will see
> buttons even with javascript disabled/not present.
> I can let javascript set a cookie, which subsequently php can read
> and so display the buttons. But for a first visit to the site the
> buttons will not be seen, they only appear when changing pages or
> reloading the page.
> 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.
> Or is there a solution to this dilemma?
> [server does not know if client has javascript or not on first serve].

How about adding some "empty" links to the page, like

   <a href=".." accesskey="..."></a>


More information about the pmwiki-users mailing list