| View previous topic :: View next topic |
| Author |
Message |
orixilus
Joined: 04 Jan 2008 Posts: 8
|
Posted: Thu Feb 14, 2008 7:36 pm Post subject: Quickform - javascript for element |
|
|
Hi,
I'm creating a new element type for quickform which needs some javascript.
I only need to add this javascript once, for every instance of this type of element - what's the best way to do it?
thanks |
|
| Back to top |
|
 |
mark

Joined: 07 Jan 2007 Posts: 1011
|
Posted: Thu Feb 14, 2008 8:22 pm Post subject: |
|
|
You could follow the idea in the hierselect element:
| Code: |
if (!defined('HTML_QUICKFORM_HIERSELECT_EXISTS')) {
// output the JS code and define the constant
}
|
|
|
| Back to top |
|
 |
orixilus
Joined: 04 Jan 2008 Posts: 8
|
Posted: Thu Feb 14, 2008 9:14 pm Post subject: |
|
|
thanks, Mark!  |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|