Thread: Lowest value?

    #1
  1. No Profile Picture
    Contributing User
    ASP Explorer (0 - 99 posts)

    Join Date
    Jan 2014
    Posts
    69
    Rep Power
    5

    Lowest value?


    Hi guys

    My issue seems straight forward enough but I can't seem to find a solution anywhere so I fear it's no possible. Anyway, here goes...

    I basically have the following script (classic asp)

    ----------------
    <%
    width = "200"
    height = "400"
    %>
    ----------------

    What I need is for my page to display which of the two, width or height, has the lowest value. The values will dynamically change from time to time dependant on other factor. So, in the above example it would be the width, with a value of "200", is the lowest. However, what I need to display on my page is the word "height" or "width" on my page. So, the display on my page, for the above example, would simply read:

    -----------------------
    width
    -----------------------

    Is this at all possible? and if so, then how it is done in classic asp? Any help would be fully appreciated.

    Best regards

    Rod from the UK
  2. #2
  3. Contributing User
    ASP Skiller (1500 - 1999 posts)

    Join Date
    Mar 2005
    Location
    Columbus, OH
    Posts
    1,665
    Rep Power
    283
    it should be just
    Code:
    if width < height then
    response.write "Width"
    else
    response.write "Height"
    end
    GK
    __________________________________________________ _____
    if you found this post is useful click Give Rep button (bottom side on this reply ) and agree
  4. #3
  5. No Profile Picture
    Contributing User
    ASP Explorer (0 - 99 posts)

    Join Date
    Jan 2014
    Posts
    69
    Rep Power
    5
    Excellent - thanks GK!

    Best regards

    Rod from the UK

Similar Threads

  1. Sea Ice Lowest in 800 Years (LiveScience.com)
    By RSS_News_User in forum Science News
    Replies: 0
    Last Post: July 1st, 2009, 06:04 PM
  2. Highest/Lowest Int values
    By Glasgow_Man in forum Programming Help
    Replies: 3
    Last Post: November 5th, 2008, 01:24 AM
  3. Oil falls below $121, lowest since May (Reuters)
    By RSS_News_User in forum Business News
    Replies: 0
    Last Post: July 29th, 2008, 12:04 PM
  4. Find lowest value in ID field?
    By USBed in forum Microsoft Access Help
    Replies: 5
    Last Post: February 15th, 2008, 10:35 AM

IMN logo majestic logo threadwatch logo seochat tools logo