Argus51 Posted December 13, 2005 Share Posted December 13, 2005 Please, can anyone help me. I'm totally stuck at the moment? I need to be able to show a variable number of from 2 to 20 images in separate *.asp pages where the visitor should be able to navigate forward and backward. The number of images/*.asp pages are varying but the number are known when pic_1.asp starts and the number is sent in the query string to pic_2.asp, pic_3.asp etc. However in pic_2.asp I have the following tests: [FONT=Arial][SIZE=1]<img src="../../english/images/spacer.gif"></p><font color="#000080"><a target="_self" href="pic_1.asp?zone=<%=p_zoneidx%>&type=<%=p_proptypeidx%>&id=<%=p_refid%>&lang=<%=p_language%>&price=<%=p_price%>&descr=<%=p_descript%>&cur=<%=p_currency%>&loc=<%=p_location%>&beds=<%=p_bedr%>&bathr=<%=p_bathr%>&plot=<%=p_plotm2%>&build=<%=p_buildm2%>&pics=<%=p_pics%>&nxt=<%=n_next_pic%>&prev=<%=n_prev_pic%>"><%=p_prev%></a></font><img border="0" src="../../english/images/spacer.gif"></td> <%If p_pics<>n_next_pic Then%> <td width="202" bgcolor="#FF9900"><div class="umenu"> <img border="0" src="../../english/images/spacer.gif"><a target="_self" href="pic_3.asp?zone=<%=p_zoneidx%>&type=<%=p_proptypeidx%>&id=<%=p_refid%>&lang=<%=p_language%>&price=<%=p_price%>&descr=<%=p_descript%>&cur=<%=p_currency%>&loc=<%=p_location%>&beds=<%=p_bedr%>&bathr=<%=p_bathr%>&plot=<%=p_plotm2%>&build=<%=p_buildm2%>&pics=<%=p_pics%>&nxt=<%=n_next_pic%>&prev=<%=n_prev_pic%>"><%=p_next%></a></div></td> <%Else%> <td width="202" bgcolor="#FF9900"><div class="umenu"> <img border="0" src="../../english/images/spacer.gif"><a target="_self" href="pic_1.asp?zone=<%=p_zoneidx%>&type=<%=p_proptypeidx%>&id=<%=p_refid%>&lang=<%=p_language%>&price=<%=p_price%>&descr=<%=p_descript%>&cur=<%=p_currency%>&loc=<%=p_location%>&beds=<%=p_bedr%>&bathr=<%=p_bathr%>&plot=<%=p_plotm2%>&build=<%=p_buildm2%>&pics=<%=p_pics%>&nxt=<%=n_next_pic%>&prev=<%=n_prev_pic%>"><%=p_next%></a></div></td> <%End if%>[/SIZE][/FONT] But I cant get the if-test working! What do I do wrong? Link to comment Share on other sites More sharing options...
sorex Posted December 14, 2005 Share Posted December 14, 2005 what do you get when you print out p_pics & n_next_pic ?show us the results from this...!<%=request("p_pics")!<br>!<%=request("n_next_pic")!<br> Link to comment Share on other sites More sharing options...
Argus51 Posted December 14, 2005 Author Share Posted December 14, 2005 what do you get when you print out p_pics & n_next_pic ?show us the results from this...!<%=request("p_pics")!<br>!<%=request("n_next_pic")!<br><{POST_SNAPBACK}> Hello Sorex,I think I need a new function i.e. ALMOSTEQUAL, since nothing happens whentrying all different test criteria >, <, <>, =. The asp-code is evaluated into the same damn html-code every time. ex. when the actual folder has 3 pictures1st (pic_1.asp) > 3=p_pics and 1=n_next_pic2nd next (pic_1.asp) > 3=p_pics and 2=n_next_pic3rd next (pic_1.asp) > 3=p_pics and 3=n_next_pic4th next (pic_1.asp) > 3=p_pics and 4=n_next_pic5th next (pic_1.asp) > 3=p_pics and 5=n_next_picand so on.......Take a look here: http://www.perlainvest.com/pics/properties...fset=10&Id=an65 Link to comment Share on other sites More sharing options...
Argus51 Posted December 15, 2005 Author Share Posted December 15, 2005 what do you get when you print out p_pics & n_next_pic ?show us the results from this...!<%=request("p_pics")!<br>!<%=request("n_next_pic")!<br><{POST_SNAPBACK}> Sorex!I solved the problem by the following: pic_tst = p_pics - n_next_pic------if pic_tst <= 0 ......... then the ASP code are converted to the right HTML and the series of pic-.asp pages are terminated properly.Thanks anyway! Link to comment Share on other sites More sharing options...
sorex Posted December 15, 2005 Share Posted December 15, 2005 Cool, altho there are better ways of doing that.just let is scan if a next picture exists in that folder or not and then you only need to pass the number of the current picture. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now