tags:

views:

180

answers:

1

I want assign certain values to some of the cck fields through Java script while the form is loaded. I think it is best to use the body/ form onload attribute. But how do i define that in drupal? Could someone help me with this or a better solution?

A: 

As with many other tasks, Drupal has its own 'way' of handling JavaScript functionality within a site. It needs a little bit of learning and 'getting used to', but pays of in the long run.

Start with JavaScript in Drupal and work through the articles linked from there. Also, don't miss this overview of the JavaScript API.

Henrik Opel