HTML 'if' statements

Discussion in 'HTML & Website Design' started by OnyxWolf, Aug 15, 2010.

  1. #1
    I am trying to code something that will produce a link to a pop-out frame only when the frame starts a new game(which happens randomly).
    I automatically assumed that this part of the url;" &isGameActive=true "
    would come into the 'if' statement however so far I can't seem to find the right coding to suit this. I can explain more if this is unclear and any help is very much appreciated.
     
    OnyxWolf, Aug 15, 2010 IP
  2. radiant_luv

    radiant_luv Peon

    Messages:
    1,327
    Likes Received:
    34
    Best Answers:
    1
    Trophy Points:
    0
    #2
    As far as HTML concern there is no logic statement as it is not a scripting language. Perhaps you can do this with JavaScript. Try posting in the javascript subforum. I'm sure you'll get a responce.

    Thanks
     
    radiant_luv, Aug 15, 2010 IP
  3. angelortiz76

    angelortiz76 Peon

    Messages:
    15
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    If statements is in html are actually essential. I've only ever used them to perceive the browser as well as browser version. I am not sure, if they can be used to do something else, as I have never tried to do that.
    IF statements need to be within HTML comments, i.e.
     <! -- --> 
    HTML:
    IE is the one browser that will run these IF statements as it is the only browser that implement HTML comments. All the other browsers ignore HTML comments.
     
    angelortiz76, Aug 16, 2010 IP
  4. arpit13

    arpit13 Well-Known Member

    Messages:
    294
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    128
    Digital Goods:
    1
    #4
    i think u shud try js for it.
     
    arpit13, Aug 16, 2010 IP
  5. CSM

    CSM Active Member

    Messages:
    1,047
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    55
    #5
    What you mean are conditional comments -> http://en.wikipedia.org/wiki/Conditional_Comments

    You definitely have to use JS or PHP to achieve your goal.
     
    Last edited by a moderator: Aug 16, 2010
    CSM, Aug 16, 2010 IP
  6. gkcn

    gkcn Peon

    Messages:
    39
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    As far as I know, there is no if statement in HTML ?
     
    gkcn, Aug 17, 2010 IP
  7. CSM

    CSM Active Member

    Messages:
    1,047
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    55
    #7
    It is 100% sure that there is no "if statement" in HTML.
     
    CSM, Aug 17, 2010 IP
  8. herri

    herri Peon

    Messages:
    49
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    do you mean php? or other programing laguage? in html there is no "if statement" like CSM says
     
    herri, Aug 18, 2010 IP
  9. diggathedog

    diggathedog Peon

    Messages:
    235
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #9
    You'll need some javascript interaction, or server-side php scripting. HTML won't give you anything but a static display feed, and can't be "programmed" for conditional statements and variable behaviour.
     
    diggathedog, Aug 18, 2010 IP
  10. somyatrans

    somyatrans Peon

    Messages:
    15
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    try to use javascript for that
     
    somyatrans, Aug 19, 2010 IP