[isf-wifidog] Node name as javascript variable on portal page.

Benoit Grégoire benoitg at coeus.ca
Ven 27 Fév 12:15:05 EST 2009

On 22 February 2009, andrewhodel at gmail.com wrote:
> I'm currently embedding an iframe with a form which allows users to comment
> on the system from the portal page.
> As it stands now the users have to manually enter the node that they are at
> in the forum, I would ideally like to have this field be populated
> automatically based upon the node which they are currently on.
> The node name is present in on the page and I can get the information via
> the DOM however this seems like a very bad way to do things. Beyond the
> argument of people without JS, the node name is wrapped in between a div
> that has no id and only a class (although that class seems to be unique).
> Then inside a span, then inside an em. Using JS it would be ideal if the
> node name tag had it's own unique id.
> Even better would be a list of predefined JS variables for certain data an
> administrator may want to input into a form. Specifically current data
> usage, time since login, mac address, username, and node name.

The SmartyTemplate content type 
(http://dev.wifidog.org/wiki/ContentDistributionSystem#SmartyTemplate) is 
designed to do exactly what you want, except that you cannot create a <script> 
tag.  However, you can use the variables in an onclick() in a <form> or <a>.
Benoit Grégoire
Technologies Coeus inc.
-------------- section suivante --------------
Une pièce jointe HTML a été nettoyée...
URL: http://listes.ilesansfil.org/pipermail/wifidog/attachments/20090227/79f4d72c/attachment.htm 

Plus d'informations sur la liste de diffusion WiFiDog