Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Button not working

  1. #1
    Join Date
    Jun 2010
    Posts
    45
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Button not working

    I have built a large from and I have just discoverd my <button></buttom> does not work as a link

    I am using
    HTML Code:
    <button onclick="window.location.href='myurl'">Next</button>
    , but it is not working

    Help.

  2. #2
    Join Date
    Nov 2006
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    691
    Thanks
    1
    Thanked 113 Times in 111 Posts

    Default

    Hi there jelly46,

    can you supply a link to the site in question or the the full
    code so that members may better assess your problem?

    coothead

  3. #3
    Join Date
    Jun 2010
    Posts
    45
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Hello, its not live yet, i haven't uploaded any thing.

    What you see is the problem i have.

    Sorry, but thanks for replying.

  4. #4
    Join Date
    Nov 2006
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    691
    Thanks
    1
    Thanked 113 Times in 111 Posts

    Default

    Hi there jelly46,

    unfortunately, the snippet of code that you have supplied is insufficient to solve your problem.

    That is why I requested the full code in the absence of a link.

    coothead

  5. #5
    Join Date
    Jun 2010
    Posts
    45
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    OK that's fair enough, can i explain a bit more I am building a page with 9 buttons on it. Each button goes to a different link.

    How can i make <button></button> a link?

  6. #6
    Join Date
    Nov 2006
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    691
    Thanks
    1
    Thanked 113 Times in 111 Posts

    Default

    Hi there jelly46,

    you've already made the button a link.

    To answer your question as to why it does not work, requires the the full code.

    By full code, I mean at least the code that includes a reference to the variable - "myurl".

    coothead

  7. #7
    Join Date
    May 2013
    Posts
    36
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    try this

    Code:
    <form><input type="button" value="Next" onClick="window.location.href='myurl'"></form>

  8. #8
    Join Date
    Jun 2010
    Posts
    45
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    I don't have a url yet please use anyone you want.

    Code:
    <button onclick="window.location.href='http://www.google.com'">Next</button>

  9. #9
    Join Date
    Jun 2010
    Posts
    45
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    thanks janu, but it didn't work.

  10. #10
    Join Date
    Jun 2010
    Posts
    45
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    I'm using <button></button>, its all styled and ready to go.

Similar Threads

  1. Menu Bar Button Links Aren't Working
    By onestopplay in forum CSS
    Replies: 0
    Last Post: 06-19-2011, 01:34 AM
  2. Javascript not working for liquid css button
    By arc_85 in forum JavaScript
    Replies: 1
    Last Post: 10-20-2010, 10:59 AM
  3. Replies: 0
    Last Post: 10-20-2010, 10:02 AM
  4. Replies: 9
    Last Post: 08-09-2009, 04:58 PM
  5. a working register and a login button required
    By souravsaha86 in forum HTML
    Replies: 7
    Last Post: 03-30-2006, 04:55 AM

Bookmarks

Posting Permissions

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