Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6

Thread: HTML coding

  1. #1
    New to the CF scene
    Join Date
    Jan 2013
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    HTML coding

    Can I make this button to a link button?

    <!-- add a class to the .signup div when clicking the submit button. Eiher .signup-success or .signup-error -->
    <div class="signup">
    <div class="signup-inner">
    <form>
    <input id="email-signup" placeholder=" Se her!" type="email" />
    <button class="btn signup-button" type="button">Køb billet</button>
    </form>
    <div class="response">
    <p class="link"></p>
    <p class="status"></p>
    </div>
    </div>
    </div>

  • #2
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,029
    Thanks
    23
    Thanked 588 Times in 587 Posts
    Added the method and the action to the form tag. Changed input id to a name and finally replaced your button with an input. This is your code redone:
    Code:
    <!-- add a class to the .signup div when clicking the submit button. Eiher .signup-success or .signup-error -->
    <div class="signup">
    <div class="signup-inner">
    <form method="post" action="test.php">
    <input name="email-signup" placeholder=" Se her!" type="email">
    <input type="submit" value="Køb billet">
    </form>
    <div class="response">
    <p class="link"></p>
    <p class="status"></p>
    </div>
    </div>
    </div>
    And as shown in form action this is the php it calls (test.php):
    Code:
    <?php
    $Thisinput = $_POST["email-signup"];
    echo $Thisinput;
    ?>

  • #3
    New to the CF scene
    Join Date
    Jan 2013
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I dont think you got it right

    I want link to another homepage, and want it to open in A new window

  • #4
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,029
    Thanks
    23
    Thanked 588 Times in 587 Posts
    And this can't do that, why?

  • #5
    New to the CF scene
    Join Date
    Jan 2013
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Sorry! Its because I'm a totally Noob!
    Where can i paste my link?

  • #6
    Regular Coder Nerevarine's Avatar
    Join Date
    Jan 2013
    Location
    Phendrana Drifts, Tallon IV, W-Class
    Posts
    285
    Thanks
    0
    Thanked 17 Times in 17 Posts
    Blog Entries
    3
    You should be able to make it a link simply by placing a
    Code:
    <a href="yoursiteaddress">Link Text</a>
    in it. If you want a new tab, you'd simply put
    Code:
    <a href="youraddress" target="_blank">Link Text</a>
    around it. You can place link tags around a variety of things to make a link, so I hope this helps.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •