Jump to content
Argus51

Testing unknown number of images....

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?

Share this post


Link to post
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

Share this post


Link to post
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!

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...