Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problems to hide div  RSS feed

 
Janice Guevara
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I can't hide a div that I have on my jsp...I think the problem may be that there is java code inside...any suggestions???

& lt;div id="createDiv" class="hidden">
& lt;c:if test="${canCreate}">
& lt;tr>
& lt;%for(int j=0;j<listColumns.size();j++){
pageColumns=(PageColumns)listColumns.get(j);

if(pageColumns.getType()=="input"){
%>

& lt;td>& lt;input type="text" name="create_<%=pageColumns.getName()%>" />& lt;/td>
& lt;%}
if(pageColumns.getType()=="checkbox"){
System.err.println("property ");
%>

& lt;td>& lt;input type="checkbox" name="create_& lt;%=pageColumns.getName()%>"/>& lt;/td>
& lt;%}
if(pageColumns.getType()=="list")
{
%>
& lt;td>& lt;select id="create_<%=pageColumns.getName()%>" name="create_& lt;%=pageColumns.getName()%>" multiple="multiple" size="5">
& lt;logic:iterate name="CallerId" id="CallerId">
& lt;option value="<bean:write name='CallerId' property='name' />">
& lt;bean:write name="CallerId" property="callerid"/>
& lt;/option>
& lt;/logic:iterate>
& lt;/select>
& lt;/td>
<%
}
}
%>

& lt;/tr>
& lt;/c:if>
& lt;/div>


this is the button that I used and the javascript code:

function hide(identifiant) {

if (document.getElementById(identifiant).className == "hidden") {
document.getElementById(identifiant).className = "visible";
} else {
document.getElementById(identifiant).className = "hidden";
}
}

<td><input type="button" value="Create" onCclick="hide('createDiv')"/></td>
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!