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 7 of 7
  1. #1
    New to the CF scene
    Join Date
    Jan 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Javascript chess - please help

    I tried to get a one player chess game onto my site but it isn't working.
    The chess pieces and board don't load and it says "error on page" at the bottom of the screen when I click "show picture".

    Here is the code I used......
    http://javascript.internet.com/games...-cpu-oppo.html

    ....and here's my site - the chess game is near the bottom of the page...
    http://www.suikoden26.webitsmart.co.uk

    I don't know if I've given you enough information to help - sorry, I hardly know anything about html.

    Thanks for reading!!!!!!
    Have a nice day!!!!!!!!!!!!!!!!!

  • #2
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    ALL I CAN SAY IS AHHHHHHHHHHHH!

    I did not bother even looking since you have so much stuff on one page. You have everything that is annoying in a webpage! Do yourself a favor and break your site up into pages instead of one long page.

    Your problem:
    You most likely have things that are not working together. Two onload handlers or you did not copy all of the code or JavaScript files.

    Eric
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

  • #3
    Smokes a Lot
    Join Date
    Jul 2003
    Location
    CA, USA
    Posts
    1,594
    Thanks
    5
    Thanked 20 Times in 20 Posts
    LMAO -

    You wern't joking.

    As a second opinion Suikoden, and I know you didn't ask, but he is right. All those bells and whistles (figuritivley speaking) are quite irritating.

    Basscyst
    Helping to build a bigger box. - Adam Matthews

  • #4
    Regular Coder Crake's Avatar
    Join Date
    Dec 2004
    Location
    Loose, Maidstone, KENT
    Posts
    577
    Thanks
    0
    Thanked 3 Times in 3 Posts

    all i wanna say is

    we all start somewere and Suikoden26 is with a free host i was with one to on my first attempt its good hes trying html its a good place to start keep it uo suik!


  • #5
    Regular Coder
    Join Date
    Jun 2002
    Location
    Edinburgh, UK
    Posts
    402
    Thanks
    2
    Thanked 1 Time in 1 Post
    I agree with Crake. Although it can be difficult for the user, and difficult for us to help because there's so much, everyone does have to start from somewhere, and when that includes JavaScript, it normally means cutting and pasting.

    Suikoden26, I have had a look at your source and the page where you got the code from and something I've noticed between the two is that you haven't pasted the code properly. There should be a section between your <head> and </head> and there should be another bit pasted somewhere between your <body> </body> tags where you want the game to appear.
    From looking at your source, you haven't pasted the head section, so I would suggest doing this and seeing if this solves the problem. You also haven't added the <body onload="function_name();"> part either, so add this too. If these don't help, then reply and I'll have another look for you.

    Keep working at it. You'll get there eventually
    Last edited by Badman3k; 01-15-2005 at 07:00 PM.
    Rich

    "An expert is a person who has made all the mistakes that can be made in a very narrow field."

  • #6
    Smokes a Lot
    Join Date
    Jul 2003
    Location
    CA, USA
    Posts
    1,594
    Thanks
    5
    Thanked 20 Times in 20 Posts
    Yes, by all means start somewhere, but move out of that place as soon as possible. When starting out I think everyone finds the novelty in putting a bunch of wingy dings on their page, but as soon as that novelty wears off, you are left with a buch of garbage cluttering up your content, and most users will be looking for the back button. Learning javascript, and cutting and pasting pre made scripts to your page are two very different things. While it is a start, it is not exactly very constructive, IMO.

    The images are .png's so they aren't going to show up in IE. You really just have too much javascript running on the first page. It causes it to stutter, a lot. Think about how you want to organize things, categories etc. and put some of the goods into sub pages, this chess game would be a good one to put on it's own page, that way you don't have to worry about conflicting with other scripts on the page, maybe under a sub page "Games". The Badman is right too, have a second look at the instructions for using the script.

    Basscyst
    Last edited by Basscyst; 01-15-2005 at 09:03 PM.
    Helping to build a bigger box. - Adam Matthews

  • #7
    New to the CF scene
    Join Date
    Jan 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for your help everyone and sorry I've got so much stuff on the frontpage.

    I tried putting the head section and the onload event handler in but they just disappear when I save.
    I copied the head section at the top of the page because there were no <head> tags anywhere. I also don't know if you're supposed to put the <body onload="function_name();"> inside an already existing <body> tag or if it doesn't matter.
    Sorry, I'm probably speaking rubbish but I don't know a thing about html.
    I think I'll try making it on another page.

    Thanks again for your help!


  •  

    Posting Permissions

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