Jump to content

Testing unknown number of images....


Argus51

Recommended Posts

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

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>

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

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>

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...