473,396 Members | 1,805 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Perfect working Ajax game on local but fails on remote

Locally running a "devside" windows apache php mysql server ...

everything works perfectly in both firefox and iexplorer


now i install it on a remote server ... tried 3 different ones and i got the same problem everywhere .......

this is the code that's not executing
Expand|Select|Wrap|Line Numbers
  1. var fieldNameArray = new Array('aa','ab','ac','ba','bb','bc','ca','cb','cc','da','db','dc','ea','eb','ec','fa','fb','fc','ga','gb','gc','ha','hb','hc','ia','ib','ic' );
  2.     for (var i = 0; i<27;i++) {
  3.         var index = fieldNameArray[i];
  4.         var targetDiv = document.getElementById(index);
  5.         var fieldValue = "url('/images/" + boardSetupXML.getElementsByTagName(fieldNameArray[i])[0].firstChild.nodeValue + ".jpg')";
  6.         targetDiv.style.backgroundImage = fieldValue;
  7.  
  8.     }    
i tried changing the last line into backgroundImage = "black"; and they will correctly all turn black ........ like they should

i tried alert(fieldValue) in the loop ... and it correctly displays 21 image files .. like it should

but combine the two .. and its not working
it works locally ... perfect, but not on remote server
Oct 23 '06 #1
1 1348
I had to remove the starting / in the url to make it work
took me 6 hours of debugging *sigh*
Oct 23 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: C-man | last post by:
Basically I want to create a battleship game that can be played by having two clients connect to it. I was wonder what the best networking principal would be. Basically I suppose I would have to...
9
by: Martin Plantec | last post by:
Hello, I have managed (with your help!) to make a working XSLT stylesheet; it works fine locally (Windows Apache + PHP with Sablotron 1.0), but it fails on the remote host (FreeBSD Apache + PHP...
6
by: Access Newbie | last post by:
I'm using Access 2000 and I'm trying to create a pass-through query to append all the data from a local table to a remote table. I'm using the SQL query editor in MS Access to create the query (I...
9
by: Nick | last post by:
the customError feature is not working. I have it setup as the help says in my web.config file. <customErrors defaultRedirect="DsAppError.aspx" mode="RemoteOnly"/> I tried in a couple...
0
by: Michael Höhne | last post by:
Hi, we're developing some web services and use the local development server of Visual Studio 2005 to create, run and debug the project. The web service methods connect to a database hosted on a...
6
by: Brad | last post by:
I have a win2003 server workstation with multiple webs, each web has it's own ip address. In VS2005, if I select to open an existing web site, select Local IIS, the dialog correctly displays a...
4
by: Abhi | last post by:
Hi All, I have a web service method which works fine when called from my local machine i.e. from localhost but when I publish the web services to a remote machine it throws an invalid cast soap...
3
by: cold80 | last post by:
I was just doing a performance test in order to see the benefit of using AJAX instead of doing a postback on the server. So I have a simple page that performs a request to the server and write a...
7
by: =?Utf-8?B?QmlsbHkgWmhhbmc=?= | last post by:
我们现在é‡åˆ°ä¸€ä¸ªé—®é¢˜ï¼Œé€šè¿‡wcf创建的webservice,选择windows service作为宿主,采用java作为客户端调用æˆåŠŸï¼Œä½†æ˜¯æ— æ³•ä½¿ç”¨asp.net ajax调用。...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.