Skip navigation
Currently Being Moderated

how can I include a parsys inside a javascript function.

Aug 7, 2012 3:06 AM

I am using radio button provided by CQ5.4.

I am writing a javascript function which checks whether a radio button is being clicked or not..

If the radio button is being clicked an alert window is opening ..this means that function is being called when radio button is being clicked.

but when I try to include parsys instead of alert window, when the radio button is being clicked..the parsys is not appearing..

Can u please help me that how should i write the "<cq:include>" for parsys inside the javascript function so that it starts appearing on click of the radio button.




  • Currently Being Moderated
    Aug 7, 2012 12:22 PM   in reply to er.a.agrawal



       I guess you should end your java script session, create a html div and then open a new javascript tag to write the include. Maybe this is obvious, but some people forget that the <cq:include> tags need to be located in the page to display the "parsys" field. But, not sure if is exactly parsys that you want to show in the radio button click event, you see, parsys is the paragraph where you can drop components.


    Hope i've helped.

    Mark as:
  • Daniel Klco
    7 posts
    Apr 6, 2012
    Currently Being Moderated
    Aug 7, 2012 7:49 PM   in reply to er.a.agrawal



    I would recommend detecting the WCMMode and always showing the parsys if the page is displaying in edit or design mode: de.html


    Unless there is a really good reason to hide the section from authors, it's generally confusing to authors to hide a section.  Additionally, hiding a parsys in JavaScript can cause strange artifacts as the drag and drop section of the parsys won't be hidden with the content of the parsys.



    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points