1
有問題,當uploadify插件不不超過參數。
嘗試了下面的3個變種。
任何建議或經驗?
Uploadify插件不通過超過1參數
首先 - 標準的方式
解釋:portletId和JSESSIONID PARAMS在 '腳本' 通過:
oScript.text = "var $j = jQuery.noConflict();";
oScript.text+= "$j(document).ready(function(){";
...
oScript.text+= "$j('#uploadify').uploadify({";
oScript.text+= "'script' : '<%= request.getContextPath()%>/uploadFile?portletId=${portletId}&jsessionid=${pageContext.session.id}',";
...
二 - 與 'scriptData'
解釋:portletId依然存在,JSESSIONID移到 'scriptData':
oScript.text = "var $j = jQuery.noConflict();";
oScript.text+= "$j(document).ready(function(){";
...
oScript.text+= "$j('#uploadify').uploadify({";
oScript.text+= "'script' : '<%= request.getContextPath()%>/uploadFile?portletId=${portletId}',";
oScript.text+= "'scriptData' : {'jsessionid':'${pageContext.session.id}'},";
...
三 - 與事件ONSELECT和的OnOpen
(都嘗試,descriped在Problem sending additional post data to server with uploadify)
解釋:portletId保持和JSESSIONID設置事件(ONSELECT或的OnOpen):
oScript.text = "var $j = jQuery.noConflict();";
oScript.text+= "$j(document).ready(function(){";
...
oScript.text+= "$j('#uploadify').uploadify({";
oScript.text+= "'script' : '<%= request.getContextPath()%>/uploadFile?portletId=${portletId}',";
oScript.text+= "'onOpen' : function(){";
oScript.text+= "$j('#uploadify').uploadifySettings(";
oScript.text+= "'scriptData', {'jsessionid':'${pageContext.session.id}'});}";
...