[Dojo-interest] please look into the code and suggest me

srinu etta hello.etta at gmail.com
Wed Jan 24 00:14:17 MST 2007


Hi
   i have created dojo button using <html> button but, i want to do the same
with jsp, but it's not working please look into the code and suggest me.


-----------------------------------------------------------

<%@ page session="false" %>
<%@ page import="java.util.*" %>
<%@ page import="org.apache.jetspeed.page.document.Node" %>
<%@ taglib uri='/WEB-INF/tld/portlet.tld' prefix='portlet'%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"  prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/core-rt"  prefix="c-rt" %>
<portlet:actionURL portletMode="view" var="manageAction"/>
    <script>
        function checkUnAll(isCheck){
        var checkList = document.getElementsByTagName('input');
        for(var j = 0 ; j < checkList.length; j++){
            if(checkList[j].type == 'checkbox' &&
checkList[j].name.substring(0,7) == "remove_")
                checkList[j].checked = isCheck;
        }
    }
    </script>
    <script type="text/javascript">
        var djConfig = {isDebug: true};
   </script>
   <SCRIPT type="text/javascript" src="dojo-0.4.1-ajax/dojo.js">
  </script>
  <script type="text/javascript">
       dojo.require("dojo.widget.Button");
  </script>
    <FORM NAME="bookMarkForm" ACTION="<%=manageAction%>" METHOD="POST">
        <table cellspacing="0" class="display">
            <tr bgcolor="#bbbbbb" align="center">
                <th align="left" > &nbsp;</th>
                <th align="left" > Name</th>
                <th align="left" > Location</th>
            </tr>
            <c-rt:forEach var="link1" items="${requestScope.links}">

                <tr align="left">
                    <td>
                        <input type="CHECKBOX" name="remove_${link1.key}"
value="${link1.value.path}" />
                    </td>
                    <td>
                        <c-rt:out value="${link1.value.title}"/>
                        </td>
                        <td>
                            <c-rt:out value="${link1.value.url}"/>
                            </td>
                        </tr>
                    </c-rt:forEach>
                    <tr>
                        <td>
                            //the below code is not working,please suggest
me
                          <input dojoType="button" name="check" value="CHECK
ALL" onClick="javascript:checkUnAll(true);"/>

                        </td>
                    <td>
                            <input type="BUTTON" name="uncheck"
value="UNCHECK ALL" onclick="javascript:checkUnAll(false);"/>

                        </td>
                        <td>
                            <input type="submit" name="delete"
value="REMOVE" />

                        </td>
                    </tr>
                </table>
                <input type="hidden" name="backTo" value="${
requestScope.backTo}"/>
            </FORM>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://dojotoolkit.org/pipermail/dojo-interest/attachments/20070124/58528970/attachment.html


More information about the Dojo-interest mailing list