41 users online (0 members and 41 guests)  


  Results 1 to 1 of 1

Related

  1. VBScript/Html Help    Forum: HTML Forum
    Replies: 1
  2. insert vbscript into perl variable    Forum: HTML Forum
    Replies: 0
  3. HTML/VBSCRIPT checkbox help...please    Forum: Website Scripts Forum
    Replies: 4
  4. HTML/VBSCRIPT checkbox help    Forum: Website Scripts Forum
    Replies: 7
  1. #1
    craigpollard's Avatar
    New User

    Status
    Offline
    Join Date
    Aug 2007
    Posts
    1

    Variable problems in HTML / Vbscript

    Hello
    I have a form where the user chooses to "check" one variable from a list of many.
    I then want to take that variable and multiply it buy a number. Eg I want 3 wigits...
    It will work if I place the "multiply" variable in another table from the "checkbox" variable, but when I put them next to eachother in the same table the "multiply" variable is not recognised by vbscript????
    Does anyone know why?

    Code:
    <TD>My Variables<INPUT TYPE="checkbox" NAME="variablename0" Value="250">
    <SELECT NAME="multplyvar0">
    <OPTION value = 1>1</option>
    <OPTION value = 2>2</option>
    </SELECT>
    </TD>
    Then in vbscript

    Code:
    If form.variablename0.Checked Then
    total = (total + cint(form.elements(0).value)) * multplyvar0.value
    End If
    Cheers
    Last edited by vinyl-junkie; 08-20-2007 at 05:57 AM. Reason: Added code tags



Tags for this Thread