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

Problems with my function

Status
Not open for further replies.

snowboardr

Programmer
Feb 22, 2002
1,401
PH
Im trying to get it so it displays prev when you click on the last number in the menu. Any help would be great.


Function MakeNum(current, total)


Response.write &quot;<p align=&quot;&quot;center&quot;&quot;>&quot;
Response.write &quot;<font face=&quot;&quot;Arial&quot;&quot; size=&quot;&quot;1&quot;&quot;>&quot;

For i=1 to total

If i = current then 'Highlight current
Response.write &quot;<span style=&quot;&quot;background-color: #C0C0C0&quot;&quot;>&quot; & &quot;<a target=&quot;&quot;_self&quot;&quot; href=&quot;&quot;frame.asp?view=&quot; & i & chr(34) & &quot;>&quot; & i & &quot;</span>&quot; & &quot; | &quot; & &quot;</a>&quot;

Else
Response.write &quot;<a target=&quot;&quot;_self&quot;&quot; href=&quot;&quot;frame.asp?view=&quot; & i & chr(34) & &quot;>&quot; & i & &quot; | &quot; & &quot;</a>&quot;

End If

Next

If current = tTotal then
Response.write &quot;<a target=&quot;&quot;_self&quot;&quot; href=&quot;&quot;frame.asp?view=&quot; & current - 1 & chr(34) & &quot;> Prev</a>&quot;

ElseIf current <= total then
Response.write &quot;<a target=&quot;&quot;_self&quot;&quot; href=&quot;&quot;frame.asp?view=&quot; & current + 1 & chr(34) & &quot;> Next</a>&quot;

End If

Response.write &quot;</font></p>&quot;


End Function

%>
 
Edit: 'ooops forgot to change that back..


If current = <b>total</b> then
Response.write &quot;<a target=&quot;&quot;_self&quot;&quot; href=&quot;&quot;frame.asp?view=&quot; & current - 1 & chr(34) & &quot;> Prev</a>&quot;

ElseIf current <= total then
Response.write &quot;<a target=&quot;&quot;_self&quot;&quot; href=&quot;&quot;frame.asp?view=&quot; & current + 1 & chr(34) & &quot;> Next</a>&quot;

End If

Response.write &quot;</font></p>&quot;
 
Edit: 'still no idea why it won't show Prev?!?


If current = <b>total</b> then
Response.write &quot;<a target=&quot;&quot;_self&quot;&quot; href=&quot;&quot;frame.asp?view=&quot; & current - 1 & chr(34) & &quot;> Prev</a>&quot;

ElseIf current <= total then
Response.write &quot;<a target=&quot;&quot;_self&quot;&quot; href=&quot;&quot;frame.asp?view=&quot; & current + 1 & chr(34) & &quot;> Next</a>&quot;

End If

Response.write &quot;</font></p>&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top