Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0EE727C9D for ; Wed, 20 Jul 2011 21:47:59 +0000 (UTC) Received: (qmail 57199 invoked by uid 500); 20 Jul 2011 21:47:57 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 57142 invoked by uid 500); 20 Jul 2011 21:47:56 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 57134 invoked by uid 99); 20 Jul 2011 21:47:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Jul 2011 21:47:56 +0000 X-ASF-Spam-Status: No, hits=-1.6 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: 74.125.149.238 is neither permitted nor denied by domain of vpathak@orgmeta.com) Received: from [74.125.149.238] (HELO na3sys009aog115.obsmtp.com) (74.125.149.238) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 20 Jul 2011 21:47:47 +0000 Received: from nexus.stevens.edu ([155.246.14.12]) by na3sys009aob115.postini.com ([74.125.148.12]) with SMTP ID DSNKTidM61jLOldXmECyMOGdVMT4ZUcQ6CKj@postini.com; Wed, 20 Jul 2011 14:47:26 PDT Received: from guinness.cs.stevens-tech.edu (postal0.cs.stevens-tech.edu [155.246.89.3]) by nexus.stevens.edu (Postfix) with ESMTP id 9EA7630114B for ; Wed, 20 Jul 2011 17:47:23 -0400 (EDT) Received: from [155.246.81.191] (diwata.cs.stevens-tech.edu [155.246.81.191]) by guinness.cs.stevens-tech.edu (Postfix) with ESMTP id 647A34039 for ; Wed, 20 Jul 2011 17:47:23 -0400 (EDT) Message-ID: <4E274CEB.1020409@orgmeta.com> Date: Wed, 20 Jul 2011 17:47:23 -0400 From: Vivek Pathak User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101119 Lanikai/3.1.6 MIME-Version: 1.0 To: user@couchdb.apache.org Subject: Re: accessing common data within show function References: <4E27462B.8000703@orgmeta.com> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org It is static data. thanks, i already got it working by using the "this" object within show function (which points to the _design/ object) . eg: var html = this.common.html. ; On 07/20/2011 05:26 PM, Sean Copenhaver wrote: > Is this data that is constantly changing and would not be present in the > document being transformed? Or is this static data? > > On Wed, Jul 20, 2011 at 5:18 PM, Vivek Pathak wrote: > >> Hi >> >> I would like access common data within my show functions. What I need is >> very much like accessing common code using the require() function as shown >> here: http://wiki.apache.org/**couchdb/CommonJS_Modules. >> Instead of accessing code, I would like to assign the common data to a >> local js variable. >> >> Is there a simple way to do it? >> >> Thanks >> Vivek Pathak >> > >