来源输入
<SiebelMessage MessageId="1-18J35" IntObjectName="XRX R5 Letter Instance" MessageType="Integration Object" IntObjectFormat="Siebel Hierarchical">
<LetterInstance Id="1-1RUYIF" Language="ENU" TemplateType="SA">
<Field Value="CO Last Name" Datatype="String" Name="ContractingOfficerLastName">
</LetterInstance>
</SiebelMessage>
Run Code Online (Sandbox Code Playgroud)
预期结果:
<?xml version="1.0" encoding="UTF-8"?>
<SiebelMessage MessageId="1-18J35" IntObjectName="XRX R5 Letter Instance" MessageType="Integration Object" IntObjectFormat="Siebel Hierarchical">
<LetterInstance Id="1-1RUYIF" Language="ENU" TemplateType="SA">
<ContractingOfficerLastName>CO Last Name</ContractingOfficerLastName>
<PONumber>POTest000001</PONumber>
</LetterInstance>
</SiebelMessage>
Run Code Online (Sandbox Code Playgroud)
基本上获取Field元素的Name属性的值并构造一个新元素,然后获取"Value"属性的值并将其用作新元素的值.
我正在开发一个动态生成的企业应用程序,我们无法控制代码.表单中的大多数控件都有以下与之关联的代码
<select name="s_10_1_1_0" onchange = 'SWESubmitForm(document.SWEForm10_0,s_5,"","1-E0RHB7")' id='s_10_1_1_0' tabindex=1997 >
<input type="text" name='s_10_1_11_0' value='' onchange = 'SWESubmitForm(document.SWEForm10_0,s_7,"","1-E0RHB7")' id='s_10_1_11_0' tabindex=1997 maxlength="30">
Run Code Online (Sandbox Code Playgroud)
当用户尝试使用页眉或页脚中的链接导航到其他页面时,我们想要提供一个ok取消对话框.
我习惯使用以下代码绑定onbeforeunload事件并向用户显示ok取消对话框.
//this identifies the unique page name
var viewName = $('input[name="SWEView"]').val();
// if I am on desired page bind the event so that now dialog is presented to user
if(viewName == "XRX eCustomer Create Service Request View"){
$(window).bind('beforeunload', function(){
return 'Your Inquiry has not been submitted yet.';
});
}
Run Code Online (Sandbox Code Playgroud)
但问题是每次用户更改表单中任何字段的值时都会出现此对话框(我认为这是由于onchange事件存在SWESubmitForm代码).
如果用户点击窗体外的任何其他链接,或者换句话说,将onbeforeunload绑定到页面上的选择性事件(包括关闭窗口),我想onbeforeunload对话框来.
请帮忙
我正在为我的网站使用twitter bootstrap.我想使用进度条指示该过程的完成百分比.
在进度条中,我想显示正在处理的步骤的名称,并在进度条的结尾或开始处使用徽章来显示完成百分比.这是我试图做的JS小提琴链接
<div id="coolstuff" style="margin-top: 10px;">
<span class="badge" style="padding: 3px; width: 10px">10%</span>
<div class="progress" id="prgbar">
<div title="PO Details" class="bar" style="width: 20%;" id="prgwidth">Add New PO Detail</div>
</div><!-- end of progress bar -->
</div> <!-- end of cool stuff -->
Run Code Online (Sandbox Code Playgroud)
但是bade和进度条并没有并排排列.我不是很擅长CSS,所以我不知道我能做些什么来将它们排成一行.
css badge twitter-bootstrap progress-bar twitter-bootstrap-2
我是CI的新手,对重写规则知之甚少.我能够从stackoverflow post找到htaccess规则,它允许我从URL中删除index.php.ht访问规则如下
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /siebeluigen/
#Removes access to the system folder by users.
#Additionally this will allow you to create a System.php controller,
#previously this would not have been possible.
#'system' can be replaced if you have renamed your system folder.
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
#When your application folder isn't in the system folder
#This snippet prevents user access to the application folder
#Submitted by: Fabdrol
#Rename 'application' to your applications folder name.
RewriteCond …Run Code Online (Sandbox Code Playgroud) .htaccess ×1
badge ×1
codeigniter ×1
controller ×1
css ×1
dynamic ×1
jquery ×1
mod-rewrite ×1
php ×1
progress-bar ×1
siebel ×1
xml ×1
xslt ×1