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 :slight_smile:

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.

Steve

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?

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. :slight_smile:

It’s appreciated.

Steve

Hi,

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

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

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:

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?