nested if statement

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • colinod
    Contributor
    • Nov 2007
    • 347

    nested if statement

    I have a page that gets a variable from a form if the form button is pressed or a different variable if a button to zero a total is pressed, i can quite get it to work

    the code at the top of the page is

    Code:
    <% 
    runtotal = Request.form("total")
    settozero=Request.Querystring("setzero")
    If runtotal = "" Or IsNull(runtotal) Then runtotal = 0 ELSE runtotal = Request.form("total") End If
    if settozero = 0 then 
    runtotal=0
    else
    runtotal = Request.form("total")
    end if
    %>
    the pages basically keep a running total using javascript sending the totals from page to page with forms, that all works until i want to reset the complete total hence the want for a button to reset the runtotal variable in asp because my javascript that adds the totals uses this asp variable to start the calculation incase you have atotal from another page.

    i hope someone understands this!!!!
  • jhardman
    Recognized Expert Specialist
    • Jan 2007
    • 3405

    #2
    You say it doesn't quite work. What does happen?

    Jared

    Comment

    • colinod
      Contributor
      • Nov 2007
      • 347

      #3
      hi sorry forgot i fixed the problem

      Comment

      Working...