The first time to use "javascript dom" -- Add a dynamic link

Requirements: [quote]Description of Enhancement

When MNR is conducting audits on industry reports have another box on the general information form for the report # that is being audited. This can then link the two inspections together.

Analysis

An inspection report with the purpose of ‘Audit’ will be linked to one inspection report,
Add a new attribute to the foip.inspection table called audited_inspection_id. Add a new field on the New Inspection page under Purpose field call Audited Inspection Number and make it linkable so that the user can click on the number to bring up that inspection. Add the Audited Inspection Number field to the General Info Page, View All Details page, View Details page, Print page and Download page. Only show the Audited Inspection Number when the purpose of the inspection report is ‘Audit’
To help the user pick the correct inspection number use the FMU, Licence Number, approval number, to show a list of inspections. The list should contain the Inspection Date, inspection number, FMU, Block Name, Inspection Status, Inspector, Other location. In the following format:[/quote]


[code] function auditedInspectionNumberSelectorUpdate(ain) {
var myForm = document.forms.inspectionGeneralInfo;
if (ain == null)
return ;

myForm.auditedInspectionNumber.value = ain;

//<a href="http://localhost:9080/foip-app/inspectionView.do?inspectionId=2010" target="_blank"></a>
var ainElement = document.getElementById("auditedInspectionNumber");
var ainLink = document.createElement('a');
var ainText = document.createTextNode(ain);
ainLink.appendChild(ainText);
ainLink.setAttribute("href", "<%=request.getContextPath()%>/inspectionView.do?inspectionId=" + ain);
ainLink.setAttribute("target", "_blank");
ainElement.parentNode.appendChild(ainLink);
}[/code]

加拿大的森林管理系统。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值