Just make sure you include dwr in your page:
<script type='text/javascript' src='/dwr/interface/ContentletAjax.js'></script>
<script type='text/javascript' src='/dwr/engine.js'></script>
<script type='text/javascript' src='/dwr/util.js'></script>
dwr is built into dotcms so you don't have to copy files to a
location, just call what is there.
On Thu, Jul 2, 2009 at 3:29 PM, Kevin
Kirchner<kevin.kirchner@...> wrote:
>
>
> WOW! Glad I asked. I never would have thought of that. I'll give it a shot.
> Thanks.
>
> -----Original Message-----
> From: dotcms@yahoogroups.com [mailto:dotcms@yahoogroups.com] On Behalf Of
> Brad Rice
> Sent: Thursday, July 02, 2009 2:25 PM
> To: dotcms@yahoogroups.com
> Subject: Re: [dotcms] #pullContent inside a structure
>
> It is sort of a hack but you can do it. There is a hint field for each
> field on a structure. For some reason it will allow you to put
> javascript into it. I put a link to a javascript file in the first
> hint field. Then you can ajax your pull down using something like
> this:
>
> function setTitle() {
> strTitleCode = myTitleCode.value;
> ContentletAjax.searchContentlets(12089, ["text1",
> strTitleCode],[],false,1, "modDate desc", showTitleResult);
>
> }
>
> function showResult(result){
> if(result[2]){
> document.getElementById('text6').value = result[2].text2;
> }
> else {
> alert("Please review your Location and department code, because a
> dpartment listing could not be found");
> }
> }
>
> In the one above I am setting a text field based upon another field entry.
>
> On Thu, Jul 2, 2009 at 2:58 PM, Kevin
> Kirchner<kevin.kirchner@...> wrote:
>>
>>
>> Is it possible to use a #pullContent and query to populate a select or
>> multiselect when setting up a new structure? (I'm making a widget for
>> pulling contact info related to the selected building or office)
>>
>>
>>
>> Thanks,
>>
>>
>>
>>
>>
>> Kevin Kirchner
>>
>> Greenville College Web Developer
>>
>> 618.664.6502
>>
>> @kevinkirchner
>>
>> www.greenville.edu
>>
>>
>>
>>
>>
>>
>
> --
> Brad Rice
> bradrice1@...
>
> ------------------------------------
>
> dotCMS: Opensource CMS goodness.
> http://www.dotcms.orgYahoo! Groups Links
>
>
--
Brad Rice
bradrice1@...