DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

collin has posted 1 posts at DZone. View Full User Profile

Send A Request By YUI

06.04.2008
| 2994 views |
  • submit to reddit
        // description of your code here

<script type="text/javascript" src="<c:url value="/yui/yahoo-dom-event/yahoo-dom-event.js"/>"></script>
<script type="text/javascript" src="<c:url value="/yui/utilities/utilities.js"/>"></script>
<script type="text/javascript" src="<c:url value="/yui/dom/dom.js"/>"></script>
<script language="javascript">
<!--
var Event = YAHOO.util.Event, Dom = YAHOO.util.Dom, Connect = YAHOO.util.Connect;
function loadGoodsNameList(goodsType){
	if(goodsType==0||goodsType==1602){
		return;
	}
	var uri = "<c:url value="/lgt/util.do?m=listGoodsName&goodsType="/>"+goodsType+ "×tamp=" + new Date().getTime(); 
	Connect.asyncRequest("GET",uri,{
		success:function(o){
			Dom.get('goodsName').parentNode.innerHTML = "<select name='modelId' id='goodsName' style='width: 200px;'>"+o.responseText+"</select>";
		},
		failure : function(o) {
			alert(o.status);
			alert(o.statusText);
			alert(o.responseText);
		},
		argument : null});
}
//-->
</script>