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.
Page 2 of 2 FirstFirst 12
Results 16 to 19 of 19
  1. #16
    Senior Coder
    Join Date
    Apr 2011
    Location
    London, England
    Posts
    2,120
    Thanks
    15
    Thanked 354 Times in 353 Posts
    You have the following content in your head tag as well:

    Code:
    <center>
     
    <h1>McDonalds</h1>
    
    <h1>The Largest George Mcdonald Bookstore on the Web!</h1>
    ..it should be in the body. A doctype (hopefully you have one) and a title should also be present.
    "I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
    Validate your HTML and CSS

  2. #17
    New Coder
    Join Date
    Aug 2012
    Posts
    12
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Yeah, I put the script tag in just to see what would happen, because NOTHING is working. Did everything you say and NOTHING works.

    Thanks for the help, im guessing since noone said "Page works fine for me..." that its not working for anybody.

    I got it working, told someone it was working, went to bed, and when i woke up it wasnt working again. Did i put the code up unsecurely, and overnight gravity pulled it down and it fell apart? That happens, right?


    It cant find a single function. "Whats a function?" it says....."Where am i?"

    http://anodos.uphero.com/Index.htm

    Please advise
    Last edited by Anodos; 09-06-2012 at 08:10 PM.

  3. #18
    Senior Coder xelawho's Avatar
    Join Date
    Nov 2010
    Posts
    2,912
    Thanks
    56
    Thanked 545 Times in 542 Posts
    Code:
    function displayspecial() 
    
           if (currentspecial == 1) {
              alert("The current special is #1")
           }
           if (currentspecial == 2)  {
              alert("The current special is #2")
           }
           if (currentspecial == 3)  {
              alert("The current special is #3")
           }
           currentspecial = currentspecial + 1
           if (currentspecial > 3) {
             currentspecial = 1
           }
    the code within a function needs to be wrapped in curly braces: {}

    Code:
    function displayspecial() {
    //blahdeyblahblah
    }
    if you learn to use the error console you will get messages about this kind of stuff.

  4. #19
    New Coder
    Join Date
    Aug 2012
    Posts
    12
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by xelawho View Post
    Code:
    function displayspecial() 
    
           if (currentspecial == 1) {
              alert("The current special is #1")
           }
           if (currentspecial == 2)  {
              alert("The current special is #2")
           }
           if (currentspecial == 3)  {
              alert("The current special is #3")
           }
           currentspecial = currentspecial + 1
           if (currentspecial > 3) {
             currentspecial = 1
           }
    the code within a function needs to be wrapped in curly braces: {}

    Code:
    function displayspecial() {
    //blahdeyblahblah
    }
    if you learn to use the error console you will get messages about this kind of stuff.
    I do, and all it says is "Cant find function" but perhaps im doing it wrong.

    Thanks for your help, all the buttons except for that one is working. Maybe ill double check all the curly braces again.


    Edit: I fixed it! Yeah, it was a trick question (for me at least, im new, like i said) and i put the curly braces in the right position and its working. Didnt notice those, thanks!
    Last edited by Anodos; 09-06-2012 at 09:04 PM.


 
Page 2 of 2 FirstFirst 12

Posting Permissions

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