Custom JavaScript

25/04/2009

You can extend ZetaPrints web-to-print portal interactivity with your own JavaScript.  The script will be called with onload event on every page so you can attach your own event handlers as needed.

jQuery

ZetaPrints loads jQuery on every page by default. Usually it’s the most recent stable version of jQuery, but we may be lagging behind from time time. Check the version by loading http://zetaprints.com/java/jquery.min.js.

Setting up custom javascript

Log in using your site owner account (printer, publisher, business, etc.).

Navigate to BRANDING / Homepage layout.

Enter the URL to your custom web-to-print JavaScript into JavaScript URL text box.

web-to-print javascript

web-to-print javascript

Funny demo script

We have a tongue-in-cheek example of using a custom JavaScript to wreck havoc with images on the page.  Do not try this at peak ordering time!!!

Script location: http://[your domain name]/java/InitDemo.js

Alternative location: http://zetaprints.com/java/InitDemo.js

  1. Paste the URL into JavaScript URL text box and click Save.
  2. Sit tight and navigate to any web-to-print catalog page with lots of images.
  3. Click anywhere on the screen to stop the mayhem.
  4. Go back to the branding page and remove the demo script.

Make sure you remove the demo script or you won’t get a single order with those previews flying around!

See also: