Click to See Complete Forum and Search --> : Need Help with fixing Syntax on Code..


cinematic_jesi
09-10-2008, 08:23 AM
hey, I'm trying to write this correctly but I'm unable to find a resolution:

<%
dim blogvar
blogvar= request.QueryString("blog")
dim foo
foo = (Blogs.Fields.Item("ID").Value)
%>

In case you are wondering, this is placed within a loop and the "(Blogs.Fields.Item("ID").Value)" is a Dreamweaver variable for a recordset.

Then it does the following:

<li <% if blogvar=foo then response.write("id='active' ") end if%>><a title="<%=(Blogs.Fields.Item("Title").Value)%>" href="#"><%=(Blogs.Fields.Item("Title").Value)%></a></li>

I can't get.. foo to work. =[

sstalder
09-12-2008, 12:33 AM
Show us two lines of code doesn't really help us much. Technically there is nothing wrong with that 'code' persay, so we will need a little more information.

What do you mean foo doesn't work, can you be more specific?

cinematic_jesi
09-12-2008, 07:51 AM
Did you not see this in the post?
<li <% if blogvar=foo then response.write("id='active' ") end if%>><a title="<%=(Blogs.Fields.Item("Title").Value)%>" href="#"><%=(Blogs.Fields.Item("Title").Value)%></a></li>

sstalder
09-12-2008, 11:47 AM
I did, that still doesn't explain your problem.

Can we can an error code, or a better explanation of why it does not work? Or even debug your script and tell us what your variables are returning.

Can we see where you create the Blogs object, does the ID field actually exist? There are all basic things that we need to know to help.