PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Quickform - javascript for element

 
Post new topic   Reply to topic    PEAR Forum Forum Index -> HTML
View previous topic :: View next topic  
Author Message
orixilus



Joined: 04 Jan 2008
Posts: 8

PostPosted: Thu Feb 14, 2008 7:36 pm    Post subject: Quickform - javascript for element Reply with quote

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
View user's profile Send private message
mark



Joined: 07 Jan 2007
Posts: 1053

PostPosted: Thu Feb 14, 2008 8:22 pm    Post subject: Reply with quote

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
View user's profile Send private message
orixilus



Joined: 04 Jan 2008
Posts: 8

PostPosted: Thu Feb 14, 2008 9:14 pm    Post subject: Reply with quote

thanks, Mark! Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PEAR Forum Forum Index -> HTML All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
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



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement

'Actiemonitor' online projectmanagement software