开发者

Open new window in form submission

I have a table of data in rows with a check box per row, done by passing in '#tableselect' for the #type using the FAPI. I would like to take the user selected options, send them to the $_GET url of an external site, and show that external site in a new window (the external site draws a graph using my data) using javascript. In my form submission function, I have:

drupal_add_js('$(document).re开发者_如何学JAVAady(function() {window.open(\'' . $url . '\')});', 'inline');

I can see that Drupal adds this line on the page when I click the submit button, but no new window is opened when I step over the line in Firebug. What am I doing wrong?


thanks, I got it to work by changing the javascript to

drupal_add_js('window.open(\'' . $url . '\')', 'inline')
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜