クリックでサードパーティの Web サイトを開くカスタム html ボタンを追加するにはどうすればよいですか?
いくつかのチュートリアルに従いましたが、そのようなコードは私にとってはうまくいきません:
'customCode' => '{literal}<input id="Button" title="Button" class="button" type="button" name="Button" value="Some Button" onClick="window.open("http://google.com","","width=800,height=600");">{/literal}',
'sugar_html' =>
array (
'type' => 'button',
'value' => 'Button',
'htmlOptions' =>
array (
'class' => 'button',
'id' => 'Button',
'title' => 'Button',
'onclick' => 'window.open("http://google.com","","width=800,height=600");',
'name' => 'Button',
),
),
'' 文字列を " で分割します。http が入力プロパティとして扱われるように! あらゆる種類の文字エスケープを試しましたが、プロパティとして扱われるものと値として扱われるものを変更するだけです。その URL をそのまま取得したことは一度もありません。