following is my
java script code where i check for the icon by its id which is generated while i display it and after cheking i write the code to display the window.
but i have to chek it by hard coded path...which will make the code too lengthy if there are more icons added to my database.
is der some oder way to check and display accordingly
<SCRIPT type=text/javascript>
$(document).ready(function() {
//for parent menus
<%
int a=0;
while(a<size){
a++;
%>
$("#imageId<%=a%>").click(function(){
//alert("hello");
if($(this).attr("src")=="images/searchlnk.png" ){
$("#search").slideToggle("slow"); //window with id search will toggle
}
if($(this).attr("src")=="images/mnagelnk.png" ){
$(".managedivhid").slideToggle("slow"); //window with class managedivhid will toggle
}
if($(this).attr("src")=="images/reportlnk.png" ){
$("#rep").slideToggle("slow"); //window with id rep will toggle
}
});
<%}%>
//for child images
<%
int b=0;
while(b<size){
b++;
%>
$("#img<%=b%>").click(function(){
//alert("hiii");
if($(this).attr("src")=="images/custolnk.png" ){
$("#custo").slideToggle("slow"); //window with id custo will toggle
}
if($(this).attr("src")=="images/contink.png" ){
$("#content").slideToggle("slow"); //window with id content will toggle
}
if($(this).attr("src")=="images/branchlnk.png" ){
$("#branch").slideToggle("slow"); //window with id branch will toggle
}
});
<%}%>