List Template Question
Last Post 01-10-2011 12:19 PM by Ryan Bakerink. 2 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
WawayUser is Offline
skipping stones
skipping stones
Posts:8
Avatar

--
01-10-2011 12:01 PM
    Good day.

    I am just a beginner with DNN and Dynamic User Directory. On one of our projects, we are using DUD to display a list of places on where you can stay for a holiday. I used a bit of javascript for each item to display specific details that we capture during registration.

    Everything is working fine if I don't use the pagination option. But once i activate it, on the first page, it works but once i go the second page, the javascript does not work already. I need to hit refresh to make it work again. Any idea why this is happening?

    Thanks
    WawayUser is Offline
    skipping stones
    skipping stones
    Posts:8
    Avatar

    --
    01-10-2011 12:07 PM
    Here's the code that I am using for each list item

    <table cellspacing="0" cellpadding="0" border="0" align="center" width="574">
        <tbody>
            <tr>
                <td colspan="3">&#160;</td>
            </tr>
            <tr>
                <td width="60" valign="top"><img width="60" alt="" src="/Portals/gt/Dynamic-Registration_Images/[large photo]" /></td>
                <td width="300" valign="top" style="border-left: 5px solid rgb(255, 255, 255);"><a class="profile_list_business" href="http://[UserDetailLink]">
                <h2 style="font-size: 16px; color: rgb(0, 113, 61); padding: 0px; margin: 0px;">[business name]</h2>
                </a>
                <div style="font-size: 12px; color: rgb(0, 113, 61);" class="profile_list_city">[city]</div>
                </td>
                <td valign="top" style="text-align: right;"><!-- &lt;div id="facilities_[userid]" style="text-align: right;"><script type="text/javascript">document.write(facilities('[facilities available]'));</script></div> -->
                <div id="fac_[userid]">[facilities available]</div>
                </td>
            </tr>
            <tr>
                <td style="border-bottom: 1px solid rgb(204, 204, 204);" colspan="3">&#160;</td>
            </tr>
        </tbody>
    </table>
    <script language="javascript" type="text/javascript">
    //<![CDATA[
    (function() {
    if(document.getElementById("fac_[userid]").innerHTML != "")
    {
    var f = document.getElementById("fac_[userid]").innerHTML.split(",");
    document.getElementById("fac_[userid]").innerHTML = "";
    while(f.length)
    {
    var i = f.pop().toLowerCase();
    document.getElementById("fac_[userid]").innerHTML += "<img src=\"/Portals/gt/images/icons/"+i+".gif\" alt=\""+i+"\" title=\""+i+"\" /> ";
    }
    }
    }
    )();
    //]]>
    </script> 
    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    01-10-2011 12:19 PM
    Hello Waway,

    Unfortunately the rich text editor only allows HTML and CSS styles. It's not able to use JavaScript. This may be a telerik setting that can be changed to allow script to be embedded. But by default JavaScript can't be embedded.

    Perhaps if instead of using the Rich Text Editor, select the basic text and place this code into it to see if the JavaScript will render and work.

    If you have any questions please let me know.

    Thanks,

    Ryan


    ---
  • film izle
  • 720 izle
  • film
  • sinema izle
  • film makinesi
  • T�rk�e dublaj film
  • film izle
  • film izle
  • baglan film izle
  • sinema izle
  • 1080 film izle
  • film mercegi