Disable submit button until user clicks link

Discussion in 'JavaScript' started by Legym, Oct 13, 2010.

  1. #1
    Hello DP

    This is my first post. Hopefully in the future i can be a more valuable member in this subject. :cool:
    For now, I have lot's of questions and won't be giving to the community yet. >.<

    For the past few hours i have been reading this post:
    http://forums.digitalpoint.com/showthread.php?t=348892&

    In my header section, i have:
    Then all my links have
    Lastly, I have the script where it shows the submit button:
    I have two questions regaurding this.
    1. The first one is how do i code it to where when the user presses the "submit" button, it takes them to another site? I have tried everything and i cannot seem to do this. :confused:
    2. My last question is when i run my code, everything works, but I.E gives me an error saying that "link1clicked is not defined". What did i do wrong?

    Hopefully i can get some help. ^.^
     
    Legym, Oct 13, 2010 IP
  2. krsix

    krsix Peon

    Messages:
    435
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #2
    <button onclick="document.location='http://newsite'">ButtonTextYay</button>


    For IE, make that 'var link1clicked' instead of just 'link1clicked'
     
    krsix, Oct 13, 2010 IP
  3. Legym

    Legym Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I figured out that you had to establish the varaible. (Duh)
    Var VariableName = 'Link';

    I tried your code and it worked. However, it completely by passes the links that i want to be required to be clicked before they can move on.
    This is what i have so far:

    http://happycomputerdays.info/security/FacebookButton.html

    I want both buttons to be pushed before the "Submit" is available.
    <button onclick="document.location='http://newsite'">ButtonTextYay</button> works, but you only need to click one of the links. I would like for it to be available when the user clicks both links.
     
    Legym, Oct 13, 2010 IP