Hi All,

Any idea about how to use javascript within drupal pages whose input type is changed to PHP. Can we mix both javascript and PHP within drupal pages? If yes, can you please guide me to some note illustrating the javascript being used within drupal pages along with PHP.

Thank you very much for your time.

Sincerely,
Manish

Comments

scrypter’s picture

You can include js with drupal_add_js(), it can be a file or 'inline', check out the handbooks or look in core code such as form.inc. If you have a serious amount of coding, you might consider creating a module rather than using php input type.

www.purpleoar.co.nz/scryptik - Javascript editor with syntax error checking
www.purpleoar.co.nz - Web development, Drupal consultancy

www.purpleoar.co.nz/scryptik - Javascript editor with syntax error checking
www.purpleoar.co.nz - Web development, Drupal consultancy