troubleshooting Question

NEED URGENT HELP WITH THIS SCRIPT!!

Avatar of Sector10
Sector10 asked on
JavaScript
12 Comments1 Solution1824 ViewsLast Modified:
I am having problems trying to increment the i value in this script,
Every time i call this function it should increment the i value to create another recordset.

It runs perfectly but i just won't increment the i value, why??

Please help!!

<script type="text/javascript" language="JavaScript1.2">
function CreateMenu(vMenuName)
{
      stm_bm(["menu55b3",430,"","blank.gif",0,"","",0,0,50,0,50,1,0,0,"","",0],this);
      stm_bp("p0",[1,4,0,0,2,3,0,7,100,"",-2,"",-2,50,0,0,"#fffff7","#fffff7","",3,1,1,"#000000"]);
      stm_ai("p0i0",[0,vMenuName,"","",-1,-1,0,"","_self","","","","",0,0,0,"arrow_r.gif","arrow_r.gif",7,7,0,0,1,"#fffff7",0,"#b5bed6",0,"","",3,3,1,1,"#fffff7","#000000","#000000","#000000","8pt Verdana","8pt Verdana",0,0]);
      stm_bpx("p1","p0",[1,2]);
      <%
      i = i + 1
      Set rsMenu = Dc.Execute("SELECT * FROM tblSubmenu Where (MenuEnabled=1) And Menu_ID = " & i)
      While Not rsMenu.EOF      
      sSubMenu = rsMenu("MenuItem")
      %>
      stm_aix("p1i0","p0i0",[1,"<%=sSubMenu%>"]);
      stm_bpx("p2","p0",[1,2,0,0,2,3,0,0]);
      <%
      Set rsSubMenu = DC.Execute("Select * From tblSubMenuItem Where (SubEnable=1) And SubMenu_ID=" & rsMenu(0))
      While Not rsSubMenu.EOF
      sSubMenuItem = rsSubMenu("SubItem")
      %>
      stm_aix("p2i0","p0i0",[1,"<%=sSubMenuItem%>","","",-1,-1,0,"","_self","","","","",0,0,0,"","",0,0]);
      <%rsSubmenu.MoveNext%>
      <%Wend%>
      stm_ep();
      <%rsMenu.MoveNext%>
      <%Wend%>
      stm_ep();
      stm_ep();
      stm_em();
      //-->
}
</script>


Regards,

Paul
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 12 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 12 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros