Adding extra attributes to webform input element I am looking to run javascript for a textbox on a webform. I am looking to add an extra attribute to my webform, but I am not sure how the webform is rendered . I was able to do that for my cck form using hook form alter but unable to do that for a webform.

Simply I have 

&lt;input type="text" maxlength="128" name="submitted[school_name_cancer]" id="edit-submitted-school-name-cancer" size="32" value="" class="form-text required" /&gt;


But I would like

&lt;input type="text" maxlength="128" name="submitted[school_name_cancer]" id="edit-submitted-school-name-cancer" onkeyup="lookup(this.value);'" size="32" value="" class="form-text required" /&gt;


Thanks.
see this Form API Quickstart Guide http://drupal.org/node/751826 to review how to build forms, know how a form is builded:


  The Drupal Form API provides sophisticated form techniques and also
  allows for almost unlimited possibilities for custom theming,
  validation, and execution of forms. Even better, ANY form (even those
  in core) can be altered in almost any way imaginable--elements can be
  removed, added, and rearranged.


if your javascript is for validate fields of your form, I guess that this answer (related with validations of fields) could be useful How do I create custom content types in drupal?