displaying SELECT

folks <br />
<br />
i have a JSP application where at one place i will be displaying a SELECT list with the data from the backend i.e. populating list dynamically, I am getting some weired display, I appreciate if you could let me know where the problem is , Below is the code what i am doing :--<br />
<br />
<form id="form1" action="" onsubmit="" style="margin:auto;"><br />
<p style="text-align:center"><br />
<% <br />
String arg ="contact"; <br />
ViewableCollection stuff = ResourceBroker.getObjects(arg); <br />
DynamicObject dyno = (DynamicObject) stuff.get(0); <br />
String html = stuff.toHtml(); <br />
System.out.println("HTML OUTPUT:" + html); <br />
Hashtable entity = Entity.getEntities(); <br />
Enumeration enum = entity.keys(); <br />
while (enum.hasMoreElements()) { <br />
String key = (String) enum.nextElement(); <br />
Entity en = (Entity) entity.get(key); <br />
String entityName = en.entityName; <br />
System.out.println("Entity Types:" + entityName); <br />
String htmlStr = "<select name=\"entityNames\" onchange=\"Process(this.options[this.selectedIndex].value);\">"; <br />
htmlStr +=" <option value=\"-1\" >Please Select One</option>"; <br />
htmlStr +=" <option value=\""+entityName +"\" >"+entityName+"</option>"; <br />
htmlStr+="</select>";<br />
System.out.println("HTML OUT : " + htmlStr);<br />
String arr = "hai";<br />
%><br />
<div align="center"><%=htmlStr%></div><br />
<%<br />
}<br />
%><br />
</p><br />
</form><br />
<br />
<br />
Any code is appreciated<br />
<br />
thanks<br />
GG<br />
<br />
Moderators Note<br />
<br />
Please do not cross post.Youar question has been answered in the JS forum.<br />
Crossposting is considered rude.<!--content-->
 
Back
Top