Hello all
I am very new to asp coding and i have a problem which i need help on.
Here is the code i've written so far.
	What i'm trying to do is when the user ticks the box(s) the value goes into endresult but with a twist!!
If i do a single tick then endresult would = that value.
But if i do multiple ticks then i want to find the lowest value then inclued a " - " and find the highest value i.e 2007 - 2009, 2007 - 2010 and so on.
I've been able to work out single ticks which i have done here. But when if comes to finding a value morethan 1 it becomes a bit more complicated for me at a beginners level.
I do hope some will be able to help me with this.
Thanks in advance.
Rickky
					I am very new to asp coding and i have a problem which i need help on.
Here is the code i've written so far.
Code:
	<body>
<%
year1 = request.form("2007")
year2 = request.form("2008")
year3 = request.form("2009")
year4 = request.form("2010")
	If year1 = "" AND year2 = "" AND year3 = "" AND year4 = "" then
		endresult = "NO RESULT"
	End If
	If year1 = "2007" AND year2 = "" AND year3 = "" AND year4 = "" then
		endresult = "2007"
	End If
	If year1 = "" AND year2 = "2008" AND year3 = "" AND year4 = "" then
		endresult = "2008"
	End If
	If year1 = "" AND year2 = "" AND year3 = "2009" AND year4 = "" then
		endresult = "2009"
	End If
	If year1 = "" AND year2 = "" AND year3 = "" AND year4 = "2010" then
		endresult = "2010"
	End If
Response.write endresult
%>
<form method="POST" action="checkbox.asp">
	<p>
	<input type="checkbox" name="2007" value="2007">2007 
	<input type="checkbox" name="2008" value="2008">2008 
	<input type="checkbox" name="2009" value="2009">2009 
	<input type="checkbox" name="2010" value="2010">2010  
	<input type="submit" value="Submit" name="B1"></p>
</form>
</body>
If i do a single tick then endresult would = that value.
But if i do multiple ticks then i want to find the lowest value then inclued a " - " and find the highest value i.e 2007 - 2009, 2007 - 2010 and so on.
I've been able to work out single ticks which i have done here. But when if comes to finding a value morethan 1 it becomes a bit more complicated for me at a beginners level.
I do hope some will be able to help me with this.
Thanks in advance.
Rickky
Comment