You can use show a popup message using CARBON.showPopupDialog method. Try the following..
function doReRouteMessages(){ jQuery.ajax({ url:"path_to_ajaxprocessor.jsp", data:{key1:"val1",key2:"val2"}, type:"POST", success:function(data){ //Let's say data is something like the following string data = "queue1#queue2"; data = data.split("#"); var selectElement = '<select id="allQueues">'; for(var i=0;i<data.length;i++){ selectElement+='<option value="'+data[i]+'">'+data[i]+'</option>'; } selectElement+='</select>'; CARBON.showPopupDialog(selectElement,"Select a queue",200,true, function(){ var selectedQueue = jQuery('#allQueues').val(); alert("you have selected " + selectedQueue); //Do the rest of the the stuff you want to do with the UI here } ); } }); } Note: I am using jQuery instead of usual $ syntax, because of the conflict between jQuery and Prototype. Also I am assuming that "path_to_ajaxprocessor.jsp" is returning a sting in the given format in the code. I have hard coded it in there, but you can remove that line when you are getting an actual response. I have just written this method, but haven't tested it. But this should work :) thanks, Chanaka On Sun, Mar 30, 2014 at 9:31 PM, Hasitha Hiranya <hasit...@wso2.com> wrote: > Hi, > > I need to do following. > > I have a button In UI like below (which is inside a table) > > <th align="right"> > <a style="background-image: > url(../admin/images/move.gif);" > class="icon-link" > onclick="doReRouteMessages()">ReRoute</a> > </th> > > then doReRouteMessages() method there should do this. > > *1. make a popup with a drop down in it.* > *2. drop down should show available queues in the system. I can get them > from calling a stub method.* > *3. once user select a queue from drop down and click ok in the pop-up I > should return to doReRouteMessages() method with the selected queueName.* > > Then doroute method will call a ajax processor to move the selected > messages to the selected queue from the dropdown. > > What I am not clear is how to do the bold parts. Please help. > > Thanks. > > > > -- > *Hasitha Abeykoon* > Software Engineer; WSO2, Inc.; http://wso2.com > *cell:* *+94 719363063* > *blog: **abeykoon.blogspot.com* <http://abeykoon.blogspot.com> > > -- Chanaka Jayasena Senior Software Engineer; WSO2, Inc.; http://wso2.com/ email: chan...@wso2.com; cell: +94 77 785 5565 blog: http://chanaka3d.blogspot.com
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev