Open an image in a new pop up window when form submit button is clicked in Drupal 7
You can give like this:

$form['submit'] = array(
        '#type' =&gt; 'submit',
        '#value' =&gt; t('Submit'),
        '#attributes' =&gt; array(
            'onclick' =&gt; 'function_name()'),
        )
    );