PDA

View Full Version : A little ASP/JS issue...


parallon
08-25-2006, 12:50 AM
Can anyone see what is wrong with the following code?

sHTML = sHTML & " <td><a HREF=""javascript:getProject("" & <%=Server.URLEncode(projectid)%> & "")"" tabindex=-1><img SRC=""../images/memo.gif"" border=0 align=top ALT=""Go to Project""></a></td></tr>" & Chr(10)

I'm getting the following error:

Microsoft VBScript compilation error '800a0409'

Unterminated string constant

/Wo/Wolab.asp, line 178


Thanks in advance,

Parallon

Wylie
08-25-2006, 02:09 AM
There have very serious problem of line structure, you cannot use double quotation like that.

degsy
08-31-2006, 04:07 PM
You need to sort out your string quotes and your ASP delimiters

You don't need ASP delimiters if you are already within them. You only need them if you are breaking into HTML etc.

Try this

sHTML = sHTML & "<td><a HREF=""javascript:getProject('" & Server.URLEncode(projectid) & "')"" tabindex=-1><img SRC=""../images/memo.gif"" border=0 align=top ALT=""Go to Project""></a></td></tr>" & Chr(10)

parallon
08-31-2006, 04:17 PM
Awesome! Thank you,

Parallon