Here is an RQL plugin I wrote using AJAX

http://www.solutionexchange.info/RQLConsole.htm

On Jan 6, 4:55 pm, Jian Huang <[email protected]> wrote:
> Yes, one can get loginguid and session key from info placeholders.
>
> And yes, running RQL via Ajax is preferred over preexecting RQL.
>
> 1.  Preexecution adds additional complexity to the project and slows
> page rendering and everything else down.
> 2.  When preexecuting RQL WRITEs, CMS may run into a deadlock:
> Preexecution is waiting for Pagebuilder to finish building page from
> elements, Pagebuilder is waiting for element to finish updating caused
> by Preexecution.
>
> Best way to do RQL within CMS?
>
> Any ASP invoked from within CMS (once the user is logged in), one can
> get the loginguid and session key via session variables, IE:
> session("loginguid")...
>
> Then why not just construct the RQL using javascript and send it via
> AJAX to an asp page that does nothing but execute RQL commands?
>
> Best,
>
> -Jian
>
> On Jan 6, 3:47 pm, Luca Loguercio <[email protected]> wrote:
>
> > not sure if it's changed in newer versions, but in 7.5 you can get
> > both those as Info placeholders.
>
> > a very crude example could be
>
> > <!--RDExecute=ASP-->
> > <%
> > ' create RedDot and XML objects
> > Set objIO = Server.CreateObject("RDCMSASP.RdPageData")
> > objIO.XmlServerClassName = "RDCMSServer.XmlServer"
> > Set objXMLDOM = Server.CreateObject("Microsoft.XMLDOM")
> > objXMLDOM.async = False
> > '********************************************************
> > ' This part takes the value of subLevelHeadline
> > ' and copies it into PageTitleMetaTag
> > '********************************************************
>
> >     'load elements belonging to current page
> >     strXML = "<IODATA loginguid=""<%LoginGUID%>""
> > sessionkey=""<%SessionKey%>""><PAGE guid=""<%PageGUID%>""><ELEMENTS
> > action=""load""/></PAGE></IODATA>"
> >     strXML = objIO.ServerExecuteXml(strXML, strError)
> >     ' load returned XML into object
> >     objXMLDOM.LoadXML(strXML)
> >     Set Elements = objXMLDOM.getElementsByTagName("ELEMENT")
> >     ' loop until we find 'PageTitleMetaTag'
> >     For Each Element In Elements
> >         If Element.getAttribute("name") = "stf_name" Then
> >             ' get its GUID
> >             stf_nameGUID = Element.getAttribute("guid")
> >             Exit For
> >         End if
> >     Next
> >     ' save the value of subLevelHeadline into the guid of PageTitleMetaTag
> >     strXML = "<IODATA loginguid=""<%LoginGUID%>""
> > sessionkey=""<%SessionKey%>""><ELEMENTS action=""save""><ELT guid="""
> > & stf_nameGUID & """
> > value=""<%subLevelHeadline%>""></ELT></ELEMENTS></IODATA>"
> >     strXML = objIO.ServerExecuteXml(strXML, strError)
>
> > %>
>
> > On Thu, Jan 6, 2011 at 3:34 PM, Killingsworth, Chad A
>
> > <[email protected]> wrote:
> > > Pre-execution and RQL don't normally go together. During the 
> > > pre-execution phase, you don't have access to session key or login guid 
> > > information. You'll be required to log in a dummy account, make your 
> > > change, and then log them back out . It's not pretty.
>
> > > Instead, you might consider running an ajax style call, set the value, 
> > > then reload the page if the value was changed. We've found this strategy 
> > > to be much more robust.
>
> > > Chad Killingsworth
> > > Assistant Director of Web & New Media
> > > Missouri State University
>
> > > -----Original Message-----
> > > From: [email protected] 
> > > [mailto:[email protected]] On Behalf Of Dave R
> > > Sent: Thursday, January 06, 2011 11:24 AM
> > > To: RedDot CMS Users
> > > Subject: Using Asp/RQL to set content of a Standard Field
>
> > > Hey,
> > > I've got a standard field that I want to change the content of when a 
> > > pre-execute script runs. What is the easiest way to do that?
>
> > > Example: Prior to the pre-exec script stf_name contains no content.
> > > After the pre-exec, stf_name should contain "Set".
>
> > > --
> > > You received this message because you are subscribed to the Google Groups 
> > > "RedDot CMS Users" group.
> > > To post to this group, send email to [email protected].
> > > To unsubscribe from this group, send email to 
> > > [email protected].
> > > For more options, visit this group 
> > > athttp://groups.google.com/group/reddot-cms-users?hl=en.
>
> > > --
> > > You received this message because you are subscribed to the Google Groups 
> > > "RedDot CMS Users" group.
> > > To post to this group, send email to [email protected].
> > > To unsubscribe from this group, send email to 
> > > [email protected].
> > > For more options, visit this group 
> > > athttp://groups.google.com/group/reddot-cms-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"RedDot CMS Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/reddot-cms-users?hl=en.

Reply via email to