Warning: Undefined variable $UploadMaxSize in /home/kongdmdu/pmichaud/pmwiki/local/PITS.php on line 8

Warning: Undefined variable $UploadMaxSize in /home/kongdmdu/pmichaud/pmwiki/local/PITS.php on line 9

Warning: Undefined variable $UploadMaxSize in /home/kongdmdu/pmichaud/pmwiki/local/PITS.php on line 10

Warning: Undefined variable $UploadMaxSize in /home/kongdmdu/pmichaud/pmwiki/local/PITS.php on line 11

Warning: Undefined array key "pmwiki" in /home/kongdmdu/pmichaud/pmwiki/pub/skins/vector/vector.php on line 14

Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/kongdmdu/pmichaud/pmwiki/pub/skins/vector/vector.php on line 14

Warning: Undefined array key "pagename" in /home/kongdmdu/pmichaud/pmwiki/pub/skins/vector/vector.php on line 225

Warning: Undefined array key "pagename" in /home/kongdmdu/pmichaud/pmwiki/pub/skins/vector/vector.php on line 253
00354: add onload"..." to <body> - PITS - PmWiki

00354: add onload"..." to <body>

Summary: add onload"..." to <body>
Created: 2005-03-04 05:37
Status: Closed
Category:
From: Klonk
Assigned:
Priority: 2
Version: 2.0beta24
OS:

Description: I want to create a cookbook recipe which uses Javascript. But for correct working a javascript function has to be called at BODY-onload.

So my question: Of course I could put the "onload" directly in the TMPL file, but I want to avoid that, so the recipe could be used with every skin.

How can I achieve this?

(Or at least in which variable do I have to replace the <body> with e.g. <body onload="..."> to get it in the output??


Does it have to go in the <body> tag? As long as the script is in the document output after the elements it needs to process (e.g., at the end), it can usually be made to work. For example, this is how we're able to place the input focus in the password prompt box without modifying the <body> tag.

Short of that, there's not yet a good skin-invariant way to manipulate <body>. Sorry about that. If you come up with one, let me know. :-) --Pm


Could use a different approach. See Cookbook/TreeMenu if you're interested. But as soon I find a good way I'll tell you. Klonk