JavaScript

The ability to insert JavaScript is an advanced ability of Sandvox. Because of the extent of JavaScript and the many ways in which it can be incorporated into a Sandvox site, Karelia does not attempt to provide its own JavaScript tutorial, nor can it provide specific troubleshooting advice related to an individual user's JavaScript code.

If you would like to explore the possibilities that using JavaScript in your Sandvox site presents and need some assistance, we encourage you to visit the following third party sites that specifically address JavaScript issues:

Sandvox allows you to insert HTML code in a number of places:


Anywhere that HTML code can be inserted a site, you can also use JavaScript. This can be as part or all of the code.

Note that if your scripts require any additional files or other resources to function, you will have to upload and maintain these files separately from Sandvox.

Preferences

The Sandvox Preferences allow you to specify whether to Load Data from the Internet. With this preference disabled, Sandvox will not load JavaScript while editing a site. This allows Raw HTML objects that use JavaScript to load an external resource to be skipped.

We suggest that where you do use JavaScript, you follow it with code like this:

<noscript>
<p>Note: You do not have JavaScript Enabled on this browser.</p>
</noscript>

This will help remind you that JavaScript is not enabled as a result of this preference. Note that the preference has no effect upon a site once it is published. All JavaScripts should work as normal.

Also, in the Raw HTML object editing window you can set the Content Type to 'HTML - No Preview' and this will cause the HTML object not to display, but to just show a placeholder in the web view while working on your Sandvox site.


Keywords: JavaScript, java, script, scripts, JavaScripts, html, code, java-script, java-scripts, code, codes, coding, file, files, resource, resources

How can we improve this page? Let us know.