Home News Contact Us Forum About Us Demos Products F.A.Q.
Shopping Cart
You currently have 0 items in your cart.


Recent Events
  • 23/11/2024 Black Friday 2024

    BIG SALE, 30% discount for all our extensions. Use BF24 coupon code. Hurry up the discount is valid till 3 December.

  • 31/12/2023 New Year SALE

    We are glad to announce New Year SALE. 25% discount for all our extensions. Use NY24 coupon code. Hurry up the discount is valid till 7 January.


2Checkout.com, Inc. is an authorized retailer of goods and services provided by ARI Soft. 2CheckOut




Follow us on twitter



Welcome, Guest
Please Login or Register.    Lost Password?

Using Javascript with in ARI Smart Content
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: Using Javascript with in ARI Smart Content
#47690
Using Javascript with in ARI Smart Content 10 Years, 9 Months ago Karma: 0
I've discovered that I can include HTML within a ARI Smart Content, but I've not been successful using jQuery/javascript. Can jQuery/javascript be used within ARI Smart Content? If so, would you please provide an example.
The administrator has disabled public write access.
 
#47699
Re:Using Javascript with in ARI Smart Content 10 Years, 9 Months ago Karma: 760
Hello,

Could you provide a sample where we can see what javascript code do you want to use?

Regards,
ARI Soft
The administrator has disabled public write access.
 
#47707
Re:Using Javascript with in ARI Smart Content 10 Years, 9 Months ago Karma: 0
admin wrote:
Hello,

Could you provide a sample where we can see what javascript code do you want to use?

Regards,
ARI Soft


I discovered that by putting a <script> tag inside of your {coltemplate} tag, most, perhaps all JavaScript can be used. Here's what I'm now using to display a club listing at, http://coloradosquaredance.com/index.php/necsdc-clubs

Code:

{arijdatatable bPaginate="true" sPaginationType="full_numbers" iDisplayLength="25" bAutoWidth="false"}
   {aricsvtable file="/data/xml/areaClubs_NE.csv" sortBy="dayWeek" sortDir="asc"}
      {aricsvtablecolumns}
       {aricsvtablecolumn id="dayWeek" alias="Day" pos="1" width="10%"}
               {coltemplate}
         <script>var day = '{$dayWeek}'.substr(2,3); document.write(day);</script>
              {/coltemplate}
       {/aricsvtablecolumn}
        {aricsvtablecolumn id="clubIcon" alias="Icon" pos="2" width="25%"}
            {coltemplate}<IMG SRC="/images/icons/{$clubIcon}" ALT="{$clubIcon}" width="80" >{/coltemplate}
        {/aricsvtablecolumn}
        {aricsvtablecolumn id="clubName" alias="Name/Description" pos="3"}
           {coltemplate}<strong>{$clubName}</strong> - {$danceLevel}  - {$clubDesc}        
            - <a href="http://coloradosquaredance.com/index.php/events-calendar/eventsbyyear/?search_fv={$clubName}" target="_top">View Club Events Calendar</a>
            - {arilinkifier target="_blank"}Web Link: {$webLink} {/arilinkifier}

           {/coltemplate}
         {/aricsvtablecolumn}

        {aricsvtablecolumn id="clubContactInfo" alias="Contact Info" pos="3"}
        {coltemplate}{arilinkifier target="_blank"}{$clubContactInfo} - {$clubContactEmail}{/arilinkifier}{/coltemplate}           
        {/aricsvtablecolumn}


        {aricsvtablecolumn id="venueName" alias="Venue" pos="4" width="25%"}
           {coltemplate}{$venueName}, {$venueAddress1}, {$venueCity}, {$venueState} {$venueZipcode}
           {/coltemplate}
        {/aricsvtablecolumn}

        {aricsvtablecolumn id="cssdaMember" alias="CSSDA" pos="5" width="12%"}
            {coltemplate}{$Area} / {$cssdaMember}{/coltemplate}
         {/aricsvtablecolumn}

      {/aricsvtablecolumns}
  {/aricsvtable}
{/arijdatatable}



The administrator has disabled public write access.
 
#47709
Re:Using Javascript with in ARI Smart Content 10 Years, 9 Months ago Karma: 760
Values in "Day" column are shown as defined in javascript:



Regards,
ARI Soft
The administrator has disabled public write access.
 
#47710
Re:Using Javascript with in ARI Smart Content 10 Years, 9 Months ago Karma: 0
Yes, the value in column {$dayWeek} includes a number, (i.e., 1 Sun) so that the column can be sorted by the day of the week, but I don't want the number to be shown so I use JavaScript ( <script>var day = '{$dayWeek}'.substr(2,3); document.write(day);</script>) to strip away the number and display just the day of the week. Is there a better way to accomplish the same task?
Last Edit: 2014/02/06 15:43 By CSSDAweb.
The administrator has disabled public write access.
 
#47711
Re:Using Javascript with in ARI Smart Content 10 Years, 9 Months ago Karma: 760
A possible solution is adding a custom filter to <joomla_directory>\administrator\components\com_arismartcontent\kernel\SimpleTemplate\Filters\ folder and use it to format value of "Day" column on server side without javascript.

Regards,
ARI Soft
The administrator has disabled public write access.
 
Go to topPage: 1