I wonder whether someone may be able to help me please.
I’ve been working on a Google maps application that will allow users to geocode and reverse geocode from the information they provide on a input form.
As it stands at the moment I have separate HTML and Javscript files, and, with thanks to some of the people on this forum they work fine.
However, I now would like to run these from my SQL server. Because I’m very new to programming in general and especially that around Javascript and google maps I naively thought that it would be a simple job of putting the relevant Javascript, HTML and PHP files on my server and everything would work.
How I was wrong!
But having looked at the web there seems to be a number of solutions to this problem.
As I said earlier this is very new to me, so I just wondered whether someone, with a bit more knowledge of this could point me in the right direction please, and whether indeed, it is better to amalgamate the Javascript and HTML files rather to perform some sort of conversion to enable me to use the Javascript files.
Many thanks
Chris
I’m not sure of your level of understanding, so I’m just going to start at the top and I apologize for covering something you already understand.
When you create your HTML and Javascript, let’s assume it’s in the same file for now. Your web application is going to get hit, and your server is going to take the request and serve the page up to the client. This will be in the form of the same HTML and script you typed into your IDE. Each inidividual browser is going to interpret that, format it, and basically build the page up to the user.
All of the javascript comes along for the ride, and is hooked up client side. Note that if your javascript is in a different file, it still comes along for the ride, as long as it’s referenced correctly by your page. At this point your job is done. They can play with your page even without internet access, as long as they don’t do anything that requires a post back to the server.
This means that as long as you can get your javascript to the user, your job is done.
In short, when you say you want to run javascript on your SQL server, we aren’t sure what you’re implying. There is no reason to run javascript from a SQL box. Do you want the SQL server to also serve your web page? Or do you have some code in javascript that you want to run over a dataset?