Hi Joel,

You can use JavaScript to send and parse RQL, all my plugins are using this 
method

https://github.com/jhuangsoftware/j-rql-connector-https

For example, AutoFileName, a plugin that automatically set headline as 
published file name upon viewing the page first time

https://github.com/jhuangsoftware/AutoFileName

Anyways, without diving into RQL, yes you can use JavaScript to grab the 
project name, and your code is really close, but you have to understand 
that the CMS UI is a nested nest of iframes.  The SmartTree or SmartEdit 
area is just an frame within another frame within another frame.  Yes, 
frame not iframe.

<frame name="ioTreeIFrame"> is 3 frames nested, so

var TheRealUIContainerPage = parent.parent.parent.document;
var ProjectLabelText 
= $(TheRealUIContainerPage 
).find('#ctl00_ctl00_ctl00__bodyPlaceHolder__infoMenu_2 
.ca_tb_txt').text();

Please note that I can be wrong with the 3 level nesting, maybe more, and 
also, the projectlabeltext might be within another frame.  But it is just 
javascript at that point.

On Tuesday, May 6, 2014 2:06:02 PM UTC-4, Joel Kinzel wrote:
>
> Mario: Great to know, but we don't want to use pre-execute at all (we have 
> a very large installation and customer base and doing so would be 
> detrimental to performance). 
>
> Jian,
>
> It will be inside the CMS. I saw that there is a project session variable, 
> but only the GUID is available. I'll assume the RQL has to be done using 
> pre-execute (which we don't want to use). My gut was to use JavaScript, but 
> I wanted to make sure before I did that I wasn't missing anything. 
>
> $('input[name="project-name"]').val($('#ctl00_ctl00_ctl00__bodyPlaceHolder__infoMenu_2
>  
> .ca_tb_txt').text());
>
> Does that look right to you?
>
> On Tuesday, May 6, 2014 7:50:34 AM UTC-5, Jian Huang wrote:
>>
>> Hi Joel,
>>
>> Where will the end user activating the form from?  Published site or 
>> inside CMS?
>>
>> If inside CMS, you can use RQL, or Session variable, or JavaScript 
>> grabbing text from CMS UI.
>>
>> -Jian 
>>
>> On Tuesday, May 6, 2014 7:18:07 AM UTC-4, Mario wrote:
>>>
>>> There was a discussion about that 
>>>
>>> http://markmail.org/message/3x43ymhcpxfp4djp#query:+page:1+mid:arbxfgawqfaej5ny+state:results
>>>  
>>>
>>> Cheers 
>>> Mario 
>>>
>>> On 6 May 2014 00:18, Joel Kinzel <[email protected]> wrote: 
>>> > All: 
>>> > 
>>> > I'm attempting to create a support form within one of my content 
>>> classes so 
>>> > that my users can easily e-mail our support staff when they run into 
>>> > trouble. I need to add a hidden field to indicate which project the 
>>> user is 
>>> > e-mailing from. Is there anyway to do this within a content class? We 
>>> are on 
>>> > 11.1 if that makes any difference. 
>>> > 
>>> > Any help is greatly appreciated. 
>>> > 
>>> > -- 
>>> > You received this message because you are subscribed to the Google 
>>> Groups 
>>> > "RedDot CMS Users" group. 
>>> > To unsubscribe from this group and stop receiving emails from it, send 
>>> an 
>>> > email to [email protected]. 
>>> > To post to this group, send email to [email protected]. 
>>> > Visit this group at http://groups.google.com/group/reddot-cms-users. 
>>> > For more options, visit https://groups.google.com/d/optout. 
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"RedDot CMS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/reddot-cms-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to