Hidden field value and action processing in JSP foreground __jsp
Source: Internet
Author: User
Plug a specific value into the hidden field to pass back to the table
/**
*フォームにデータをセットする.<br>
* @param form_noデータをセットするpropertyのform name またはformのインデックス
* @param propertyデータをセットするオブジェクト Name
* @param value propertyにセットする
*/
function Setformdata (Form_no, property, value) {
if (Property | | property = = 0) ... {
var obj = Document.forms[form_no].elements[property];
if (obj.length) ... {
Duplicate number with じ name があった field together は, all ての project I set してしまう
for (var i = 0; i < obj.length; i++) ... {
Obj[i].value = value;
}
}else ... {
1つの Stadium
Obj.value = value;
}
}
} /**/ ...
Processing the request for the action
/**
*アクション name を becomes more する.
*ウインドターゲットはパラメータは can be becomes です.
* Specify されたときにターゲットを setting します.
*
* @param from_noフォームno
* @param targetウインドターゲット
* @param propertyプロパティ Name
*/
function Actionchange (From_no, property, target) {
var mainpath = window.location.href;
var site = mainpath.indexof (contextpath);
var headpath = mainpath.substring (0, site + contextpath.length);
if (property.substring (0, 1) = = "/") ... {
document.forms[from_no].action= Headpath + property;
else ... {
document.forms[from_no].action= Headpath + "/" + property;
}
if (target!= null) ... {
Document.forms[from_no].target=target;
}
} /**/ ...
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.