SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Nov 2009
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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.

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

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

    StevePairs.zip

  2. #2
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    6,064
    Mentioned
    219 Post(s)
    Tagged
    12 Thread(s)
    Hi,

    Works fine for me, locally and on a remote server.
    Can you provide a link to a page where I can see this not working?

  3. #3
    SitePoint Member
    Join Date
    Nov 2009
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Post

    Hi Pullo,

    Thanks for the reply. Here's a link to the site where I can't get it working.

    http://www.mandytw.com/pairs/index.htm

    I've tried various combinations url calls for the "dir" function and the src in both the pairs.htm and loader.htm files including using the direct url links without any success.

    http://www.mandytw.com/pairs/pairs.htm

    Thanks for taking the time to look.

    It's appreciated.

    Steve

  4. #4
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    6,064
    Mentioned
    219 Post(s)
    Tagged
    12 Thread(s)
    Hi,

    In the page you link to, there is an error in the load() function.

    You currently have this (I un-minified it):

    Code:
    function load(f){
      file="private/loader.htm?"+f;
      winwidth=660;
      winheight=536;
      wposx=0
      wposy=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 are missing a semi-colon after "wposx=0", it should be:

    Code:
    function load(f){
      file="private/loader.htm?"+f;
      winwidth=660;
      winheight=536;
      wposx=0;
      wposy=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);
    }
    Does that help?


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
  •