a neater script exampleRSS

1 reply

Last post Dec 10, 2004 11:44 AM by tomkmvp

  • a neater script example

    Dec 09, 2004 10:21 PM|trenpete|LINK

    Hi, I am learning asp and I have the below script. The idea is that strHTMLx is different in the array. strHTMLx(1), strHTMLx(2) and strHTMLx(3) hold different values. If they have the same value as the other 2 than try and search again. This is used for a banner ad rotator where 3 images are displayed on 1 screen but all 3 images are different. For a validation what if there was only 1 image. how can I stop the script and display only 1 or 2 images. Any help will be appreciated ----------code begin----------------------- For banner_numb = 1 to 3 strHTMLx(banner_numb) = objAdRot.GetAdvertisement(banner_file_path) next do until strHTMLx(2) <> strHTMLx(1) strHTMLx(2) = objAdRot.GetAdvertisement(banner_file_path) loop do until strHTMLx(3) <> strHTMLx(2) strHTMLx(3) = objAdRot.GetAdvertisement(banner_file_path) loop do until strHTMLx(3) <> strHTMLx(1) strHTMLx(3) = objAdRot.GetAdvertisement(banner_file_path) loop
  • Re: a neater script example

    Dec 10, 2004 11:44 AM|tomkmvp|LINK

    "For a validation what if there was only 1 image. how can I stop the script and display only 1 or 2 images? " You'll need to incorporate UBound(strHTMLx) in a Do loop. This tells you the upper limit of your array.