20 Feb
2008
20 Feb
'08
5:07 a.m.
I'm trying to implement a solution where I need to call a javascript method when one of the drupal rendered tabs are clicked on. I tried the following solution to no avail: /* Tab #1 */ $form['dispTabs']['tab_one'] = array( '#type' => 'tabpage', '#title' => t('Tab Number One'), '#weight' => '-2', '#content' => $tab2Content, '#attributes' => array("onclick" => "jscriptMethodToCall(\"Content 1\",\" Conent 2\", null)") ); I even attempted to use onmouseup. Does anyone have an idea as to why this does not render? Are attributes not a valid input for tabpages? If not, is there a simple way to do this? Scott Matthews Senior Developer Optaros, Inc. smatthews@optaros.com