I'm no genius in javascript, but I'm implementing a DHTML menu code into my site, and want to know if Its possible to put an if/then/else into an array... and what the proper syntax would be. Code I want is below, ASP code is red Note: The red ASP code in the javascript is what I WANT to say, only I want to say it in javascript, not asp
//Defining Javascript variables from asp
<%
If not(Trim(MemberID) = "") or not(MemberID = 0) then
response.write("var ARC_Loggedin = ""true""" & vbcrlf)
else
response.write("var ARC_Loggedin = ""false""" & vbcrlf)
End if
%>
[blue]
<Script Language="Javascript">
//Script starts.... yata yata
HM_Array2_1 = [
[],
If ARC_Loggedin = "false" then
["Login","login.asp",1,0,0],
["Register","policy.asp",1,0,0],
else
["Logout","logout.asp",1,0,0],
End if
//the script goes on...
</Script>