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 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Feb 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Any Help REALLY appreciated with this short script

    Hi all,

    I'm trying to get the below javascript game (a pelmanism game) working without much luck and I'm not seeing the error. Locally, the game works fine, but once uploaded, there's a problem with the code used to call the img files through - and I can't hunt it down.

    The index page makes a call through javascript to a one player or two player game which I can't make work online. If I launch loader.htm or pairs.htm from the /private/ folder, both initially load, but fail to call any img files.

    This file size and length is short, and while I was hoping to have it uploaded for a class on Monday, I'm now curious how to make it work.

    I hope that somebody else, who's interested in solving simple coding problems, can help me with this and I'm keen to learn. I hope I've explained this well enough

    The online example is below. I've attached the zipped game.

    http://www.mandytw.com/pairs/index.htm This loads index.htm which in turn should load
    http://www.mandytw.com/pairs/private/loader.htm which loads..
    http://www.mandytw.com/pairs/private/pairs.htm

    Thanks to anyone who has a minute or two to take a look.

    Steve
    Attached Files Attached Files

  • #2
    Senior Coder Logic Ali's Avatar
    Join Date
    Sep 2010
    Location
    London
    Posts
    1,028
    Thanks
    0
    Thanked 207 Times in 202 Posts
    Your code shows thus:
    Code:
    <!-- Hidefunction load(f){file=dir+"/private/loader.htm?"+f;winwidth=660;winheight=536;wposx=0wposy=0;new_window=window.open(file,"fp","status=no,resizable=yes,toolbar=no,scrollbars=no,screenX="+wposx+",screenY=0,left="+wposx+",top="+wposy+",width="+winwidth+",height="+winheight);}// -->
    You can see that your <!-- comment has introduced a syntax error.
    If you're at school, these comments have been unnecessary probably all your lifetime and should be removed. The same applies to anyone who may have taught you to use them.

    Is it really necessary to have an external code file just to contain filetype="gif"?

  • #3
    New to the CF scene
    Join Date
    Feb 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi there Logic Ali,
    The code wasn't written by me, but thanks for the critique. A working version of the game is at the below website:

    http://primary.naace.co.uk/activities/Pairs/index.htm

    I tried uncommenting the script you highlighted but it's still not making any difference.

    Thanks again for taking a look!

  • #4
    Senior Coder Logic Ali's Avatar
    Join Date
    Sep 2010
    Location
    London
    Posts
    1,028
    Thanks
    0
    Thanked 207 Times in 202 Posts
    Quote Originally Posted by MrBlobby View Post
    Hi there Logic Ali,

    I tried uncommenting the script you highlighted but it's still not making any difference.
    Now use the error console.


  •  

    Posting Permissions

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