I have found myself well out of my depth, using a template to create a web site with both JS and PHP scripts. Perhaps someone here can help me?

The single page website is accually finished and works well when viewed in a browser from local files. These have been uploaded to 1and1 (my host) but fail to produce some of the nice little effects as intended when viewed online.

As far as I can see the files have all been uploaded in their correct position and order (it seems to be very important to have ajax.googleapis.com in the correct level - I had it wrong at first on my local drive)
The site is www.garden-design.co.uk

When you land on the page the only thing you should see is a large area with a black background (and text and photo) and the menu on the LHS.

What you actually see should be reveiled only by pressing the "continue" button. It should close down again by clicking the www.garden-design.co.uk speach balloon.

Any ideas what I (or 1and1) have done?

Dani AI

Generated

Quick summary and context: reported a page that behaves correctly on a local machine but loses scripted effects once uploaded. As noted, the most common causes are missing or misreferenced assets; 's point about forum placement is noted but the problem itself is a classic deployment mismatch.

Practical checklist to zero in on the issue:

  • Inspect the browser Console (F12) for JavaScript exceptions and the Network tab for 404 / 403 responses or blocked resources.
  • Request any suspicious asset directly in the browser or via a quick header check, for example:
curl -I https://domain.tld/path/to/script.js
  • If viewing the server-side page source shows raw PHP (<?php … ?>), PHP is not being executed by the host. If scripts fail to load, the Network results will show which URLs are wrong.

Key differences between local and hosted environments to verify:

  • Filesystem case sensitivity: Windows is forgiving; most web hosts are not. Exact filename case must match.
  • Relative path resolution: a path like js/app.js resolves relative to the page location; a leading slash (/js/app.js) targets the site root. Use the correct form for pages in subfolders.
  • Script/library order: libraries must load before code that depends on them (e.g., load the DOM library before plugins).
  • Mixed-content / CORS: secure pages block insecure (HTTP) includes; cross-origin AJAX needs appropriate headers.

Server-side and hosting checks:

  • File permissions (typical files 644, folders 755), .htaccess rules or host security modules can block assets or AJAX endpoints.
  • Check server error logs or enable short-term, safe debugging to capture server-side failures.
  • Avoid changing production settings carelessly—capture the Console/Network evidence first; that almost always reveals the culprit.

This set of checks normally identifies whether the problem is a path/name/permission issue, a server configuration problem, or a client-side load/order problem.

Recommended Answers

All 3 Replies

this isn't really the best place to ask questions about this. maybe the web development forum is a more suitable place.

I think he posted here thinking Java and JavaScript was the same or similar. This thread should be moved.

In any case, if its working locally but not at the hosting site it's either that the JavaScript files were not uploaded or that the reference to those files (paths) are not correct.

Oops, sorry guys. My ignorance has been amply demonstrated. I'll try elsewhere. Thanks for the 'paths' observation though. It had occured to me.....I'll try to check.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.