filsa.net: Frontier Scripting [ Script Archive | Ideas & Issues | Polyglot | Software | Projects ]

Improving Javascript Support

Featuring suites.jsl: A pageheader script for the <SCRIPT> tag.

Originally posted 5/15/98

AddText

Brent put out a very useful macro for including scripts or bits of text on the Frontier-Work list.

I think it's a great little macro.

Since he's thinking about Javascript, I thought I'd share one script that I use for doing Javascript or VB in the #pageheader. It's part of my suites.jsl, or Javascript Library.

I was going to release this suite at some point, but since it doesn't look like it will happen soon, I think there's more to gain by sharing the idea.

jsl.scriptTag ()

Should be called from #pageheader.

Takes no parameters.

Backwards compatible with #javascript.

  • Also allows #Javascript to be an address. So it's usable in a page.
  • If #javascript is == "" or "none", we skip it. This lets you cancel a table #javascripts in a page.

Search the table for anything that begins with #jsl_, process it, and add to the <HEAD>.

This allows for flexible names-- #jsl_titleRollover or #jsl_checkFormFields. As many different scripts as you need, with no namespace problems.

Processing includes following addresses to an object. I currently DON'T check up the hierarchy for named objects, but could add it very easily.

Scripts (and other objects) that begin with #scriptLanguage are NOT executed. The #scriptlanguage param is used to generate <script> tags. Since scripts are coerced to a string, we get automatic semi-colons, braces and tabs where necessary--a big boon for Javascripters. We get to write Javascripts in outlines!

Scripts that don't begin with #scriptLanguage are executed, so you can have intelligent script objects.

You are free to use this and modify it

If this provides good ideas that can be used, I'd be really happy.

But I'd like to keep the jsl name. Thanks! Better yet, write me an email and BUG me about it, and maybe I'll clean the suite up to my satisfaction and publish it.

suites.jsl.scriptTag

Ideas & Issues
Site Outline

I&I Home
1998
  05
  Improving Javascript Support
  Featuring suites.jsl: A pageheader script for the <SCRIPT> tag.
  06
  Character Entities
  Make working with HTML character entities easy.
  Copy Address
  FileWriters Questions
  Ideas for discussion
  Navigating the ODB
  Making it easier to get around in Frontier
  Suite Info
  If you write suites, tell your users about yourself!
  07
  Binary Objects in Your Website
  Frontier needs to learn how to render binary objects
  Creating META tags
  How can I put <meta> tags into my Frontier web pages?
  Filemaker and Frontier
  Where can I find resources for scripting Filemaker with Frontier?
  Frontier Mailing Lists
  More signal, less noise
  08
  Comments on Fat Pages
  Good fatpage, bad fatpage
  Quiet Advances
  Userland continues to crank out new features, bug fixes.
  Render Table Memory Issues
  An easy fix to a problem with rendering huge websites
  12
  Rendering out to more than one server
  Filewriters should be able to see the adrPageTable

   
Back to I&I Home   >>  

Back to
the top

This is Phil's Frontier Scripting Site. San Francisco, CA
Copyright © 1996-98, Phil Suh. All Rights Reserved.
http://www.filsa.net/frontier/ii/1998/05/jsl.html
This page last built on 6/28/99; 11:06:55 PM

filsa.net: Frontier Scripting [ Script Archive | Ideas & Issues | Polyglot | Software | Projects ]