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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Advanced Query Format Question 1

Status
Not open for further replies.

bekind4u

Programmer
Feb 3, 2005
6
0
0
US
I'm having to use VBScript to write html and format a query string which includes variables. It's proving to be very frustrating.

Code:
Write_TD "<A HREF=Food_Diary_Calendar.asp?Starting_Date="& Server.URLEncode(dToday) & " CLASS='DATA' > " & PrintDay & "</A>", "BOLD"
							
Sub Write_TD(sValue, sClass)
		Response.Write "		<TD ALIGN='RIGHT' WIDTH=20 HEIGHT=15 VALIGN='BOTTOM' CLASS='" & sClass & "'> " & sValue & "</TD>" & vbCrLf
	End Sub

To briefly explain, the Subroutine Write_TD has the parameters of sValue and sClass with sClass = "BOLD" in my example and the sValue parameter being the formatted anchor link. I can't get a second variable, Ending_Date, to be recognized. Does anyone know how to enter a second variable in the format for the query string?

I realize that this is a complicated example and I hope that there's someone who is familiar with this and can help me. I have been banging my head against my desk.
 
Given variables dToday, dEnddate, PrintDay defined, it is something like this.
[tt]
Write_TD "<A HREF=[red]'[/red]Food_Diary_Calendar.asp?Starting_Date="& Server.URLEncode(dToday) & [blue]"&" & "Ending_Date=" & Server.URLEncode(dEnddate)[/blue] & "[red]'[/red] CLASS='DATA' > " & PrintDay & "</A>", "BOLD"
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top