Javascript application, I'm doing it wrong?

811
4
Jump to solution
05-27-2014 06:42 AM
MichaelThompson2
Occasional Contributor
So I downloaded the "Basic Viewer" JavaScript template and extracted it all into the "www" directory on my web server. I edited the .html with my AGOL webmap id as well as a couple other fields like title, owner, description, etc. yet all I get when I go to the page is a blank browser.

Is there more I need to do? I read about a configuration file (other than the commonConfig.js and the configuration_panel.js) but I don't know where that is or what to do with it if I find it...

I have attached my index file.

Thanks everyone!
0 Kudos
1 Solution

Accepted Solutions
MatthewLofgren
Occasional Contributor
Did it work before you made any modifications? Maybe start over fresh and see.

I just downloaded and unzipped the template without modification and it worked fine.

Does you javascript console show any errors?

View solution in original post

0 Kudos
4 Replies
MatthewLofgren
Occasional Contributor
Did it work before you made any modifications? Maybe start over fresh and see.

I just downloaded and unzipped the template without modification and it worked fine.

Does you javascript console show any errors?
0 Kudos
Noah-Sager
Esri Regular Contributor
I would open it in Chrome with the Developer Tools open in the Console tab and look for errors.

I would also make sure you are hosting the application, and not running it from file.
0 Kudos
JakeSkinner
Esri Esteemed Contributor
Hi Michael, 

Make sure you have the other .js, .css, etc files with the associated index.html.  Your index.html file appears to be correct.  I've zipped up the other files that are needed to have the application work.  You can extract this to your C:\inetpub\wwwroot folder, and then access the application by going to:

http://<server name>/BasicViewer
0 Kudos
MichaelThompson2
Occasional Contributor
Hi Michael, 

Make sure you have the other .js, .css, etc files with the associated index.html.  Your index.html file appears to be correct.  I've zipped up the other files that are needed to have the application work.  You can extract this to your C:\inetpub\wwwroot folder, and then access the application by going to:

http://<server name>/BasicViewer


I had all the template files in the right directory, there must have just been an error somewhere in my code. I did like another poster suggested and just wiped it all out and started over and it works fine now. I only use Linux so C:\ isn't an option 🙂

Thanks for the help everyone, this is an interesting way to learn to work with JavaScript but I am starting to get the hang of it. Now off to download and try out some of the other JS templates!
0 Kudos