- 浏览: 370337 次
- 性别:
- 来自: Alien
文章分类
最新评论
-
风一样的男人__:
[flash=200,200][url]引用[/url][/f ...
java线程内存模型,线程、工作内存、主内存 -
极乐君:
厉害了,,,请问可以转载到我们专栏吗?会注明来源和地址的~专栏 ...
java线程内存模型,线程、工作内存、主内存 -
zdd001:
Spring 线程池使用 -
zdd001:
Spring 线程池使用 -
u014663756:
看了三行就知道是我想要的!!
java线程内存模型,线程、工作内存、主内存
通过URL 调用WEB SERVICE,xml格式
Client client = Client.create();
WebResource webResource = client.resource(URL);
MultivaluedMap queryParams = new MultivaluedMapImpl();
String param="asx.wbc";//参数
queryParams.add("security",param);
securityDetailList = webResource.queryParams(queryParams).get(SecurityDetailModelList.class);//get data from web service
Collections.sort(securityDetailList, new Comparator(){//order by code
public int compare(Object a, Object b) {
String one = ((SecurityDetailModel)a).getSecurity();
String two = ((SecurityDetailModel)b).getSecurity ();
return one.compareTo(two) ;
}
});
弹出层JS
function windowPop(){
tipsWindown("Code Loop Up","url:get?${ctx}/public/codeSearch.jsp?param=5","550","400","true","","true","text");
}
底层JS
///-------------------------------------------------------------------------
//jQuery bring up window
//--------------------------------------------------------------------------
/*parameter
----------------------------------------------------------------------------
title:
content:The content can be { text | id | img | url | iframe }
width:The window's width
height:The window's height
drag: Whether you can drag.ture is yes ,false is no
time:Automatic closing time
showbg:[optional] set whether to display the mask layer (0 not for display,1displays )
cssName:[ optional ] additional class name
------------------------------------------------------------------------*/
//example:
//------------------------------------------------------------------------
//simpleWindown("title","text:content","500","400","true","3000","0","css")
//------------------------------------------------------------------------
var showWindown = true;
function tipsWindown(title,content,width,height,drag,time,showbg,cssName) {
$("#windown-box").remove();
var width = width>= 2000?this.width=2000:this.width=width;
var height = height>= 1000?this.height=1000:this.height=height;
var param=content.substring(content.indexOf("=")+1,content.length);//
if(showWindown == true) {
var simpleWindown_html = new String;
simpleWindown_html = "<div id="windownbg" style=""></div>";
simpleWindown_html += "<div id="windown-box">";
simpleWindown_html += "<div id="windown-title"><h2></h2></div>";
simpleWindown_html += "<div id="windown-top-title"><h1>Enter all or part the name or code.</h1></div>";
simpleWindown_html += "<div id="windown-top style=">
<form method="post" action="%24%7Bctx%7D/uma.wealthdirect/transact/CodeSearch.action"></form>&nbsp"
simpleWindown_html +="<input type="hidden" id="searchType" value='"+param+"'><input type="text" id="searchParam">&nbsp<img src="/uma.wealthdirect/public/img/Go.png" style="cursor: pointer;" name="research">
</div>"
simpleWindown_html += "<div id="windown-top-space" class="windown-top-space"></div>";
simpleWindown_html += "<div id="windown-content-border"><div id="windown-content"></div></div>";
simpleWindown_html += "<div id="windown-bottom" class="windown-bottom"><img src="/uma.wealthdirect/public/img/Close.png" style="cursor: pointer;" name="research"></div>";
simpleWindown_html += "<div id='\"windown-bottom-space\"'></div>";
simpleWindown_html += "</div>";
$("body").append(simpleWindown_html);
show = false;
}
contentType = content.substring(0,content.indexOf(":"));
content = content.substring(content.indexOf(":")+1,content.length);
switch(contentType) {
case "text":
$("#windown-content").html(content);
break;
case "id":
$("#windown-content").html($("#"+content+"").html());
break;
case "img":
$("#windown-content").html(content);
$.ajax({
error:function(){
$("#windown-content").html("<p class="windown-error">");
},
success:function(html){
$("#windown-content").html("<img src="+content+" alt="">");
}
});
break;
case "url":
var content_array=content.split("?");
$.ajax({
type:content_array[0],
url:content_array[1],
data:content_array[2],
error:function(){
$("#windown-content").html("</p>
<p class="windown-error">load error...</p>");
},
success:function(html){
$("#windown-content").html(html);
}
});
break;
case "iframe":
$.ajax({
error:function(){
$("#windown-content").html("<p class="windown-error">load error...</p>");
},
success:function(html){
$("#windown-content").html("<iframe src="%5C%22%22+content+%22%5C%22" width='\"100%\"' height='\""+parseInt(height)+"px"+"\"' scrolling='\"auto\"' frameborder='\"0\"' marginheight='\"0\"' marginwidth='\"0\"'></iframe>");
}
});
}
$("#windown-title h2").html(title);
if(showbg == "true") {$("#windownbg").show();}else {$("#windownbg").remove();};
$("#windownbg").animate({opacity:"0"},"normal");
$("#windown-box").show();
if( height >= 527 ) {
$("#windown-title").css({width:(parseInt(width)+22)+"px"});
$("#windown-content").css({width:(parseInt(width)+17)+"px",height:height+"px"});
}else {
$("#windown-title").css({width:(parseInt(width)+10)+"px"});
$("#windown-content").css({width:width+"px",height:height+"px"});
}
var cw = document.documentElement.clientWidth,ch = document.documentElement.clientHeight,est = document.documentElement.scrollTop;
var _version = $.browser.version;
if ( _version == 6.0 ) {
$("#windown-box").css({left:"50%",top:(parseInt((ch)/2)+est)+"px",marginTop: -((parseInt(height)+53)/2)+"px",marginLeft:-((parseInt(width)+32)/2)+"px",zIndex: "999999"});
}else {
$("#windown-box").css({left:"50%",top:"50%",marginTop:-((parseInt(height)+53)/2)+"px",marginLeft:-((parseInt(width)+32)/2)+"px",zIndex: "999999"});
};
var Drag_ID = document.getElementById("windown-box"),DragHead = document.getElementById("windown-title");
var moveX = 0,moveY = 0,moveTop,moveLeft = 0,moveable = false;
if ( _version == 6.0 ) {
moveTop = est;
}else {
moveTop = 0;
}
var sw = Drag_ID.scrollWidth,sh = Drag_ID.scrollHeight;
DragHead.onmouseover = function(e) {
if(drag == "true"){DragHead.style.cursor = "move";}else{DragHead.style.cursor = "default";}
};
DragHead.onmousedown = function(e) {
if(drag == "true"){moveable = true;}else{moveable = false;}
e = window.event?window.event:e;
var ol = Drag_ID.offsetLeft, ot = Drag_ID.offsetTop-moveTop;
moveX = e.clientX-ol;
moveY = e.clientY-ot;
document.onmousemove = function(e) {
if (moveable) {
e = window.event?window.event:e;
var x = e.clientX - moveX;
var y = e.clientY - moveY;
if ( x > 0 &&( x + sw 0 && (y + sh
<script type="text/javascript">
//button for the research
function researchAction(){
searchParam= $.trim($("#searchParam").val());
var length=searchParam.length;
if(length<3){
$("#result").html('<span class="error">Please enter at least two characters.</span>');
return false;
}
$("#windown-bottom").show();
$.ajax({
type:"post",
url:"${ctx}/uma.wealthdirect/transact/CodeSearch.action",
data:"searchParam="+searchParam,
success:function(data){
var dataObj=eval("("+data+")");
var lis="";
var asxCodeParam="";
if(dataObj.length==0){
$("#result").html('<span class="error">This asset cannot be found.</span>');
return false;
}
lis+="<table class='asxCode' width='100%'><tr id='trBackGround'><td align='left'>Select from the list below</td><td></td></tr>"
lis+="<tr id='trBackGround1'><td align='left'>Code";
lis+="<\/td><td align='left'>Description<\/td><\/tr>";
for(var i=0;i<dataObj.length;i++){
var dataObject=dataObj[i];
var code=dataObject.security;
var str="'"+code+"'";
lis+="<tr><td align='left'><a class='underLine' onclick=dbClickTr("+str+")>";
lis+=code;
asxCodeParam+=dataObject.security;
lis+="</a><\/td><td align='left'>";
lis+=dataObject.issuerName;
lis+="<\/td><\/tr>";
}
$("#asxCodeParam").val(asxCodeParam);
lis+=" <\/table>";
$("#result").html(lis);
trChangeColor();
}
})
}
//button for the cancel
function closeWindow(){
$("#windownbg").remove();
$("#windown-box").fadeOut("slow",function(){$(this).remove();});
}
//click the link
function dbClickTr(code){
$("#asxCodeParam").val(code);
selectResult();
}
//change the table color
function trChangeColor(){
$(".asxCode tr:odd").addClass("odd");
$(".asxCode tr:even").addClass("even");
$(".asxCode tr").hover(function(){
$(this).removeClass("even");
$(this).toggleClass("hover");
},function(){
$(this).toggleClass("hover");
$(".asxCode tr:odd").addClass("odd");
$(".asxCode tr:even").addClass("even");
})
}
</script><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Code Loop Up</title>
<form action="%24%7Bctx%7D/uma.wealthdirect/transact/CodeSearch.action" method="post">
<div id="showType">
<hidden name="asxCodeParam" id="asxCodeParam"></hidden></div>
</form>
<div id="result">
</div>
Client client = Client.create();
WebResource webResource = client.resource(URL);
MultivaluedMap queryParams = new MultivaluedMapImpl();
String param="asx.wbc";//参数
queryParams.add("security",param);
securityDetailList = webResource.queryParams(queryParams).get(SecurityDetailModelList.class);//get data from web service
Collections.sort(securityDetailList, new Comparator(){//order by code
public int compare(Object a, Object b) {
String one = ((SecurityDetailModel)a).getSecurity();
String two = ((SecurityDetailModel)b).getSecurity ();
return one.compareTo(two) ;
}
});
弹出层JS
function windowPop(){
tipsWindown("Code Loop Up","url:get?${ctx}/public/codeSearch.jsp?param=5","550","400","true","","true","text");
}
底层JS
///-------------------------------------------------------------------------
//jQuery bring up window
//--------------------------------------------------------------------------
/*parameter
----------------------------------------------------------------------------
title:
content:The content can be { text | id | img | url | iframe }
width:The window's width
height:The window's height
drag: Whether you can drag.ture is yes ,false is no
time:Automatic closing time
showbg:[optional] set whether to display the mask layer (0 not for display,1displays )
cssName:[ optional ] additional class name
------------------------------------------------------------------------*/
//example:
//------------------------------------------------------------------------
//simpleWindown("title","text:content","500","400","true","3000","0","css")
//------------------------------------------------------------------------
var showWindown = true;
function tipsWindown(title,content,width,height,drag,time,showbg,cssName) {
$("#windown-box").remove();
var width = width>= 2000?this.width=2000:this.width=width;
var height = height>= 1000?this.height=1000:this.height=height;
var param=content.substring(content.indexOf("=")+1,content.length);//
if(showWindown == true) {
var simpleWindown_html = new String;
simpleWindown_html = "<div id="windownbg" style=""></div>";
simpleWindown_html += "<div id="windown-box">";
simpleWindown_html += "<div id="windown-title"><h2></h2></div>";
simpleWindown_html += "<div id="windown-top-title"><h1>Enter all or part the name or code.</h1></div>";
simpleWindown_html += "<div id="windown-top style=">
<form method="post" action="%24%7Bctx%7D/uma.wealthdirect/transact/CodeSearch.action"></form>&nbsp"
simpleWindown_html +="<input type="hidden" id="searchType" value='"+param+"'><input type="text" id="searchParam">&nbsp<img src="/uma.wealthdirect/public/img/Go.png" style="cursor: pointer;" name="research">
</div>"
simpleWindown_html += "<div id="windown-top-space" class="windown-top-space"></div>";
simpleWindown_html += "<div id="windown-content-border"><div id="windown-content"></div></div>";
simpleWindown_html += "<div id="windown-bottom" class="windown-bottom"><img src="/uma.wealthdirect/public/img/Close.png" style="cursor: pointer;" name="research"></div>";
simpleWindown_html += "<div id='\"windown-bottom-space\"'></div>";
simpleWindown_html += "</div>";
$("body").append(simpleWindown_html);
show = false;
}
contentType = content.substring(0,content.indexOf(":"));
content = content.substring(content.indexOf(":")+1,content.length);
switch(contentType) {
case "text":
$("#windown-content").html(content);
break;
case "id":
$("#windown-content").html($("#"+content+"").html());
break;
case "img":
$("#windown-content").html(content);
$.ajax({
error:function(){
$("#windown-content").html("<p class="windown-error">");
},
success:function(html){
$("#windown-content").html("<img src="+content+" alt="">");
}
});
break;
case "url":
var content_array=content.split("?");
$.ajax({
type:content_array[0],
url:content_array[1],
data:content_array[2],
error:function(){
$("#windown-content").html("</p>
<p class="windown-error">load error...</p>");
},
success:function(html){
$("#windown-content").html(html);
}
});
break;
case "iframe":
$.ajax({
error:function(){
$("#windown-content").html("<p class="windown-error">load error...</p>");
},
success:function(html){
$("#windown-content").html("<iframe src="%5C%22%22+content+%22%5C%22" width='\"100%\"' height='\""+parseInt(height)+"px"+"\"' scrolling='\"auto\"' frameborder='\"0\"' marginheight='\"0\"' marginwidth='\"0\"'></iframe>");
}
});
}
$("#windown-title h2").html(title);
if(showbg == "true") {$("#windownbg").show();}else {$("#windownbg").remove();};
$("#windownbg").animate({opacity:"0"},"normal");
$("#windown-box").show();
if( height >= 527 ) {
$("#windown-title").css({width:(parseInt(width)+22)+"px"});
$("#windown-content").css({width:(parseInt(width)+17)+"px",height:height+"px"});
}else {
$("#windown-title").css({width:(parseInt(width)+10)+"px"});
$("#windown-content").css({width:width+"px",height:height+"px"});
}
var cw = document.documentElement.clientWidth,ch = document.documentElement.clientHeight,est = document.documentElement.scrollTop;
var _version = $.browser.version;
if ( _version == 6.0 ) {
$("#windown-box").css({left:"50%",top:(parseInt((ch)/2)+est)+"px",marginTop: -((parseInt(height)+53)/2)+"px",marginLeft:-((parseInt(width)+32)/2)+"px",zIndex: "999999"});
}else {
$("#windown-box").css({left:"50%",top:"50%",marginTop:-((parseInt(height)+53)/2)+"px",marginLeft:-((parseInt(width)+32)/2)+"px",zIndex: "999999"});
};
var Drag_ID = document.getElementById("windown-box"),DragHead = document.getElementById("windown-title");
var moveX = 0,moveY = 0,moveTop,moveLeft = 0,moveable = false;
if ( _version == 6.0 ) {
moveTop = est;
}else {
moveTop = 0;
}
var sw = Drag_ID.scrollWidth,sh = Drag_ID.scrollHeight;
DragHead.onmouseover = function(e) {
if(drag == "true"){DragHead.style.cursor = "move";}else{DragHead.style.cursor = "default";}
};
DragHead.onmousedown = function(e) {
if(drag == "true"){moveable = true;}else{moveable = false;}
e = window.event?window.event:e;
var ol = Drag_ID.offsetLeft, ot = Drag_ID.offsetTop-moveTop;
moveX = e.clientX-ol;
moveY = e.clientY-ot;
document.onmousemove = function(e) {
if (moveable) {
e = window.event?window.event:e;
var x = e.clientX - moveX;
var y = e.clientY - moveY;
if ( x > 0 &&( x + sw 0 && (y + sh
<script type="text/javascript">
//button for the research
function researchAction(){
searchParam= $.trim($("#searchParam").val());
var length=searchParam.length;
if(length<3){
$("#result").html('<span class="error">Please enter at least two characters.</span>');
return false;
}
$("#windown-bottom").show();
$.ajax({
type:"post",
url:"${ctx}/uma.wealthdirect/transact/CodeSearch.action",
data:"searchParam="+searchParam,
success:function(data){
var dataObj=eval("("+data+")");
var lis="";
var asxCodeParam="";
if(dataObj.length==0){
$("#result").html('<span class="error">This asset cannot be found.</span>');
return false;
}
lis+="<table class='asxCode' width='100%'><tr id='trBackGround'><td align='left'>Select from the list below</td><td></td></tr>"
lis+="<tr id='trBackGround1'><td align='left'>Code";
lis+="<\/td><td align='left'>Description<\/td><\/tr>";
for(var i=0;i<dataObj.length;i++){
var dataObject=dataObj[i];
var code=dataObject.security;
var str="'"+code+"'";
lis+="<tr><td align='left'><a class='underLine' onclick=dbClickTr("+str+")>";
lis+=code;
asxCodeParam+=dataObject.security;
lis+="</a><\/td><td align='left'>";
lis+=dataObject.issuerName;
lis+="<\/td><\/tr>";
}
$("#asxCodeParam").val(asxCodeParam);
lis+=" <\/table>";
$("#result").html(lis);
trChangeColor();
}
})
}
//button for the cancel
function closeWindow(){
$("#windownbg").remove();
$("#windown-box").fadeOut("slow",function(){$(this).remove();});
}
//click the link
function dbClickTr(code){
$("#asxCodeParam").val(code);
selectResult();
}
//change the table color
function trChangeColor(){
$(".asxCode tr:odd").addClass("odd");
$(".asxCode tr:even").addClass("even");
$(".asxCode tr").hover(function(){
$(this).removeClass("even");
$(this).toggleClass("hover");
},function(){
$(this).toggleClass("hover");
$(".asxCode tr:odd").addClass("odd");
$(".asxCode tr:even").addClass("even");
})
}
</script><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Code Loop Up</title>
<form action="%24%7Bctx%7D/uma.wealthdirect/transact/CodeSearch.action" method="post">
<div id="showType">
<hidden name="asxCodeParam" id="asxCodeParam"></hidden></div>
</form>
<div id="result">
</div>
- tipswindown.rar (5.7 KB)
- 下载次数: 8
发表评论
-
JQuery datepicker 用法 jQuery UI很强大,其中的日期选择
2012-09-04 12:41 1419jQuery UI很强大,其中的日期选择插件Datepicke ... -
table 交替显示色
2012-08-30 14:41 1190< ... -
Jquery常见功能使用。项目功能
2012-07-30 17:31 9261》整个构架: JS最好使用对像形式: 例如: object. ... -
Firebug & Chrome Console 控制台使用指南
2012-07-18 20:17 775console.debug(object[, object, ... -
juery 循环
2012-06-07 12:28 978$(".mandatory").e ... -
不能执行已释放 Script 的代码解块方案
2011-12-02 17:49 16664呵呵,这个问题,上面各位说的,好像都没有解决问题。 我观察发现 ... -
js左移右移
2011-08-22 15:41 1722function add(oSourceSel,oTarget ... -
Jquery 动态增加和删除行列
2011-08-22 15:40 1301function addSortTr(){ var at ... -
简单ajxa提交
2011-08-22 15:25 1111function saveAttrItem(){ ...
相关推荐
《jQuery实现弹出层插件详解》 在Web开发中,弹出层(Modal)是一种常见且实用的设计模式,用于显示额外的信息或者进行交互操作,而无需离开当前页面。jQuery,作为JavaScript的一个轻量级库,以其简洁的API和丰富...
在具体实现上,Jquery弹出层插件通常会包含一个主函数入口,比如$().xsPop,该函数可以接受一个包含各种参数的选项对象,用于配置弹出层。该函数再依次调用其他辅助函数,如添加遮罩层元素、绑定事件处理程序、处理...
《jQuery弹出层插件深度解析》 在Web开发领域,jQuery库因其简洁的API和强大的功能而广受开发者喜爱。对于用户交互和界面展示,弹出层(Modal)是不可或缺的一部分,它能够吸引用户的注意力并提供额外的信息或操作...
**jQuery弹出层插件SexyLightBox详解** 在网页设计中,弹出层是一种常见的交互元素,用于在用户点击某个链接或按钮时显示一个浮动窗口,通常用来展示图片、视频或者详细信息。SexyLightBox是一款基于jQuery的弹出层...
《jQuery Colorbox弹出层插件:实现图片弹出显示的代码详解》 在Web开发中,为了提供更好的用户体验,我们常常需要实现一种效果:当用户点击某个元素时,图片或者其他内容以弹出层的形式展示出来。jQuery Colorbox...
标签“Jquery弹出层插件”进一步明确了这个资源的核心特性,即它是利用JQuery库实现的弹出层功能。JQuery是一个广泛使用的JavaScript库,简化了DOM操作、事件处理和动画等任务,使得开发者能更高效地构建动态网页。...
在前端开发中,jQuery弹出层插件是用于创建弹窗效果的重要工具,它能够帮助开发者轻松实现模态对话框、提示信息、加载提示等交互功能。本篇将详细介绍jQuery弹出层插件,以及如何使用名为"Popup Div"的实例。 首先...
jQuery弹出层插件在网页开发中非常常见,它们用于创建弹窗、模态对话框、图片预览等效果,增强了用户体验。以下是一些流行的jQuery弹出层插件及其特点: 1. **Thickbox**: Thickbox是一款轻量级的jQuery插件,用于...
《jQuery+CSS3多功能弹出层插件v2.0.1详解》 在Web开发中,弹出层(也称为对话框或模态窗口)是不可或缺的元素,它们用于显示重要的信息、提示用户确认操作或者提供交互式内容。本文将深入探讨一款名为“20种弹出层...
首先,让我们深入了解一下jQuery弹出层插件的基本概念。弹出层通常包括模态对话框和非模态对话框两种类型。模态对话框会阻止用户与页面其他部分的交互,直到弹出层被关闭;而非模态对话框则允许用户在不关闭弹出层的...
《jQuery弹出层插件:实现简单遮罩弹出框效果》 在Web开发中,弹出层(Modal)是一种常见的交互元素,用于在用户与页面进行交互时提供额外的信息或者功能。jQuery作为一款强大的JavaScript库,提供了丰富的插件来...
**jQuery弹出层插件详解** 在Web开发中,弹出层(Popup)是一种常见的交互设计元素,用于显示额外的信息、对话框或者进行特定操作。jQuery作为一款强大的JavaScript库,提供了丰富的插件来实现弹出层功能。本文将...
jQuery zoom图片弹出层插件简单的图片相册弹出层窗口展示代码 引入相关js和css文件 <link rel="stylesheet" href="css/zoom.css" media="all" /> [removed][removed] [removed][removed] html 格式 ...
本文将深入探讨基于jQuery的弹出层插件,这个插件主要用于创建可拖动的非模态窗口,并且支持多种动态显示和隐藏效果。 首先,我们来理解什么是弹出层。弹出层是一种用户界面设计模式,它允许在不离开当前页面的情况...
本文将深入探讨标题所提及的"jQuery弹出层插件三种简单遮罩弹出框效果",以及如何利用jQuery实现这些效果。 首先,让我们了解什么是弹出层和遮罩弹出框。弹出层(Popup Layer)是一种常见的网页交互设计,当用户...
jquery fancybox弹出层插件支持Ajax,ifram jquery fancybox弹出层插件支持Ajax,ifram jquery fancybox弹出层插件支持Ajax,ifram jquery fancybox弹出层插件支持Ajax,ifram
标题中的“自己写的jquery 弹出层插件,可拖动”表明这是一个基于jQuery的自定义弹出框插件,具备拖动功能。在Web开发中,弹出层(也称为对话框或模态窗口)常用于显示警告、确认信息或者提供用户交互界面。这个插件...
【jQuery弹出层插件thickbox】是一种广泛使用的JavaScript库,它基于强大的jQuery框架,为网页添加了优雅且功能丰富的弹出层效果。 Thickbox主要用于创建全屏背景的图片查看器、轻量级的模态对话框以及iframe加载等...