Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

syntax error 1

Status
Not open for further replies.

aarellano

MIS
Oct 22, 2007
168
US
Hello,

I have an asp page that displays an xml output
asp code
Code:
act.WriteLine("<month>" & rs("month") & "</yr>" )
this displays
Code:
<month>05</month>
{/code]
I would like to display
[code]
<item month="05" value="1.2" />

I tried
Code:
act.WriteLine("<item month= >" & rs("yr") & "<value= >" & rs("dddpva")/>" )
but I get a syntax error
 
I think I almost got it
Code:
act.WriteLine("<item month=" & rs("yr") &  "value=" & rs("dddpva") & "/>" )

I am just missing the "" and the space between the number and vlaue
 
Code:
<%@LANGUAGE="JavaScript"%>

<%
yr = 5;
dddpva = 1.2;
writeln("<item month=\"" + yr + "\" value= \"" + dddpva + "\" />");
%>

Code:
<%
yr = 5
dddpva = 1.2
response.write "<item month=""" & yr & """ value= """ & dddpva & """/>" & vbcrlf
%>

--------
GOOGLE is a great resource to find answers to questions like "how do i..."

If you don't know exaclty what you want to do or what to search on, try Google Suggest: --------
I have recently been semi-converted to ensuring all my code (well most of it) works in both javascript and non-javasc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top