folks
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 :–
<form id=”form1″ action=”” onsubmit=”” style=”margin:auto;”>
<p style=”text-align:center”>
<%
String arg =”contact”;
ViewableCollection stuff = ResourceBroker.getObjects(arg);
DynamicObject dyno = (DynamicObject) stuff.get(0);
String html = stuff.toHtml();
System.out.println(“HTML OUTPUT:” + html);
Hashtable entity = Entity.getEntities();
Enumeration enum = entity.keys();
while (enum.hasMoreElements()) {
String key = (String) enum.nextElement();
Entity en = (Entity) entity.get(key);
String entityName = en.entityName;
System.out.println(“Entity Types:” + entityName);
String htmlStr = “<select name=”entityNames” onchange=”Process(this.options[this.selectedIndex].value);”>”;
htmlStr +=” <option value=”-1″ >Please Select One</option>”;
htmlStr +=” <option value=””+entityName +”” >”+entityName+”</option>”;
htmlStr+=”</select>”;
System.out.println(“HTML OUT : ” + htmlStr);
String arr = “hai”;
%>
<div align=”center”><%=htmlStr%></div>
<%
}
%>
</p>
</form>
Any code is appreciated
thanks
GG
[b]Moderators Note
Please do not cross post.Youar question has been answered in the JS forum.
Crossposting is considered rude.