Announcement

Collapse
No announcement yet.

Coding

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Coding

    Anyone here proficient with coding "if, and, or" statements? I have a website and I want to put prices up. However the price varies depending on what the subject asks for. I need something to show that it's $10/shirt for 1 color, $11/shirt for 2 colors, etc.

    I was thinking: if(shirt = 1 color) then (price = $10)

    But I know that's wrong, and there's no way for me to add a quantity for someone purchasing multiple shirts.



  • #2
    What language are you trying to do this in - Java, Javascript, etc?

    Depending on what language you are trying this in, W3Schools has some good tutorials for walking through that kind of information.

    XBL: phelixia pms ∙ Battle.net: Phelixia25 #1873
    Rabbit ∙ Deuces ∙ Sireniix ∙ SammichMakr
    ♥Love to my Grand-Littles♥

    Comment


    • #3
      It was HTML but it will have to be in Javascript.


      Comment


      • #4
        HTML to my knowledge doesn't support logic like that.

        You'll be looking for a conditional Javascript statement. I think this example is what you are looking for.

        XBL: phelixia pms ∙ Battle.net: Phelixia25 #1873
        Rabbit ∙ Deuces ∙ Sireniix ∙ SammichMakr
        ♥Love to my Grand-Littles♥

        Comment

        Working...
        X