User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP section within the Web Development category of DaniWeb, a massive community of 402,613 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,295 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP advertiser: Lunarpages ASP Web Hosting
Views: 1382 | Replies: 5 | Solved
Join Date: May 2008
Posts: 3
Reputation: NadaAngel is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
NadaAngel NadaAngel is offline Offline
Newbie Poster

unterminated string constant

  #1  
May 14th, 2008
i am developing a milt-language dynamic website in Classic ASP.

the site is in English, arabic and French and the data is all stored in an Access database.

my problem is specifically with grabbing the "FRENCH" submenus in a dynamic heir menu:

<script type="text/javascript" language="JavaScript1.2" src="includes/stmenu.js"></script>
<%  
cl="Arabic"
clF="French"
if session("CurrentLanguage")=cl then
	alignment=2
else
	alignment=0
end if
if session("CurrentLanguage")=cl then
	imgext="A"
elseif session("CurrentLanguage")= clF then
	imgext="F"
else
	imgext=""
end if
	Dim rs, rs1, checkusedarr(100)
	Dim Caption,PageId1, PageId2,PageId3, sSub,nSub,bool1,bool2, bool3,check,item,linkishere,linkishere2
	Dim SQLStr
	Dim vitem
	bool1=false
	bool2=false
	bool3=false
	check=0
   set rs=Server.CreateObject("adodb.Recordset")
   set rs1=Server.CreateObject("adodb.Recordset")
  %>
      <table width="100%" border="0" cellspacing="0" cellpadding="0" background="images/piece_14.gif">
        <tr align="center"> 
          <td> 
			<script type="text/javascript" language="JavaScript1.2">
<!--
stm_bm(["menu6b30",600,"","blank.gif",0,"","",<%=alignment%>,0,50,0,100,0,0,0,"","100%",0,0,1,2,"default","hand",""],this);
stm_bp("p0",[0,4,0,0,0,0,-1,0,100,"",-2,"",-2,50,0,0,"#999999","","images/piece_14.gif",1,0,0,""]);
<%
Set rs = cnn.Execute("SELECT * FROM SiteMap WHERE ParentId=1 and active=1")
counter=14
rs.movenext
While Not rs.EOF
response.write counter
'response.end
  PageCaption =  rs("Caption_E")
  PageId1 = rs("PageId")
			for each item in checkusedarr
					if(item=PageId1 ) then
									bool1=true
									exit for
					end if
				next
				if (cbool(bool1)<>true) then
						checkusedarr(check)=PageId1
						check= check+1
                        linkishere="default.asp?PageId="
 %> 
stm_ai("p0i1",[6,1,"#000000","images/Header_Footer1_15.gif",-1,-1,0]);
stm_ai("p0i0",[1,"","","",-1,-1,0,"<%=linkishere%><%=PageId1%>","_self","","","images/header_footer1_<%=counter%><%=imgext%>.gif","images/Header_Footer_on1_<%=counter%><%=imgext%>.gif",-1,-1,0,"","",-1,-1,0,0,1,"#FFFFF7",1,"#FFFFF7",1,"images/piece_14.gif","images/piece_14.gif",1,1,0,0,"","","#000000","#000000","8pt Verdana","8pt Verdana",0,0]);
stm_bp("p1",[1,4,2,2,3,1,0,0,79,"progid:DXImageTransform.Microsoft.RandomDissolve(,enabled=0,Duration=0.15)",12,"progid:DXImageTransform.Microsoft.RandomDissolve(,enabled=0,Duration=0.80)",12,30,1,2,"#999999","#9B2929","",1,5,1,"#000000"]);
<%
Set rs1 = cnn.Execute("SELECT * FROM SiteMap WHERE active=1 and ParentId=" &PageId1)
While Not rs1.EOF
					if session("CurrentLanguage")="English"  then 
								sSub = Rs1(GetFieldName("Caption_E")) & ""
					end if
					if session("CurrentLanguage")=cl then 
								sSub = Rs1(GetFieldName("Caption_A")) & ""
					end if

					if session("CurrentLanguage")=clF  then 
								sSub = Rs1("Caption_F")
					end if  PageId2 = rs1("PageId")
			for each item in checkusedarr
					if(item=PageId2 ) then
									bool1=true
									exit for
					end if
				next
				if (cbool(bool1)<>true) then
								checkusedarr(check)=PageId2
								check= check+1
linkishere2="default.asp?PageId="
 if PageId2 =14 then %>
stm_ai("p1i0",[0,"<%=sSub%>    ","","",-1,-1,0,"former/ged/search.htm","_blank","","","","",0,0,0,"","",0,0,0,<%=alignment%>,1,"#FFFFF7",0,"#FFFFF7",0,"","",1,1,0,0,"#FFFFF7","#000000","#000000","#000000","8pt Verdana","bold 8pt Verdana",0,0]);

<% end if 
 if PageId2 =15 then %>
stm_ai("p1i0",[0,"<%=sSub%>    ","","",-1,-1,0,"former/contactdb/searching.asp","_blank","","","","",0,0,0,"","",0,0,0,<%=alignment%>,1,"#FFFFF7",0,"#FFFFF7",0,"","",1,1,0,0,"#FFFFF7","#000000","#000000","#000000","8pt Verdana","bold 8pt Verdana",0,0]);
<% end if 

 if  PageId2 <> 14 and PageId2 <> 15 and PageId2 <> 45 and PageId2 <> 46 and PageId2 <> 47 and PageId2 <> 48 and PageId2 <> 49 and PageId2 <> 50 and PageId2 <> 51 then %>
stm_ai("p1i0",[0,"<%=sSub%>    ","","",-1,-1,0,"<%=linkishere2%><%=PageId2%>","_self","","","","",0,0,0,"","",0,0,0,<%=alignment%>,1,"#FFFFF7",0,"#FFFFF7",0,"","",1,1,0,0,"#FFFFF7","#000000","#000000","#000000","8pt Verdana","bold 8pt Verdana",0,0]);
<% end if 
 if  PageId2 = 45 or PageId2 = 46 or PageId2 = 47 or PageId2 = 48 or PageId2 = 49 or PageId2 = 50 or PageId2 = 51  then 
Set rs3 = cnn.Execute("SELECT * FROM projects WHERE  PageId=" &PageId2)
While Not rs3.EOF
					if session("CurrentLanguage")="Arabic"  then 
						ProjectTitle = rs3(GetFieldName("ProjectTitle_A")) & ""
					end if
					if session("CurrentLanguage")="French"  then 
						ProjectTitle = rs3("ProjectTitle_F")
					end if
					if session("CurrentLanguage")="English"  then 
						ProjectTitle = rs3(GetFieldName("ProjectTitle_E")) & ""
					end if
%>
stm_ai("p1i0",[0,"<%=sSub%>    ","","",-1,-1,0,"<%=linkishere2%><%=PageId2%>","_self","","<%=ProjectTitle%>","","",0,0,0,"","",0,0,0,<%=alignment%>,1,"#FFFFF7",0,"#FFFFF7",0,"","",1,1,0,0,"#FFFFF7","#000000","#000000","#000000","8pt Verdana","bold 8pt Verdana",0,0]);
<% 
rs3.movenext
wend
end if 
end if
rs1.MoveNext
Wend
%>
stm_ep();
<% end if 
rs.MoveNext
counter=counter+2
Wend%>
stm_ep();
stm_em();
//-->
</script>
		</td>
        </tr>
  <tr> 
    <td background="images/Header_Footer1_27.gif"><img src="images/Header_Footer1_27.gif" width=800 height=3 alt=""></td>
  </tr>
      </table>

the problem lies in the area in red.

the menu works PERFECTLY with english and arabic...but not french.
if i change "caption_F" to "caption_A" or "caption_E" the menu works perfectly and i don't get the "unterminated string constant" error in the task bar below, except of course it grabs the english or arabic submenus !!

BTW the same red script above..works great within the rest of the site !!
HELP HELP HELP

NadaAngel
AddThis Social Bookmark Button
Reply With Quote  

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb ASP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the ASP Forum

All times are GMT -4. The time now is 12:44 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC