Working with the "JavaScript" form

The "JavaScript" form Like a lot of Notes Web developers, I store my JavaScript code in documents where it can be accessed by multiple elements of the database. By keeping my JavaScript as separate documents from forms, I have a means for quickly updating the code without requiring a design refresh. In addition, I can make the changes with only Editor access, which is the highest level of access some developers are allowed once their databases are in a production environment. I'll summarize my method here. Create a form named "JavaScript." On this form, you will need two fields: Name and Code. The Name field is an editable text field where you will name the document. This name will be used by the @DbLookup formulas in our forms to find the documents. The Code field is an editable text field where you will place your JavaScript. To display JavaScript documents, I usually create a specific view just for them. You will probably want to hide this view to keep accidental edits and deletions from happening. Create a view now and name it whatever you like - just make sure that the alias is "JavaScript," because that is the name we'll use in the code to reference the view. The first column will need to equate to and be sorted by the value of the Name field, so that we can find the document when we perform a lookup. There is no need for any other columns in the view. Remember that the $$HTMLHead fields on the My Reports form and the $$ViewTemplateDefault form will be using @DbLookups to retrieve the JavaScript code from documents that are displayed in this view. For more information visit The View.

This was first published in February 2000

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.