Okay so I fixed all of the issue except for that I can't get the
SmartEdit code to only show up when editing just the js page. In other
words, it is showing up on all pages where the js page is connected.

Anyone have an ideas on that ? I tried mainlink.id = lastindex.id,
that did not work.

On Dec 10, 10:57 am, jkinzel <[email protected]> wrote:
> Hi All,
>
> So I got quite the head scratcher (at least for me).
>
> I need to create a dynamic element that lists the path to images, to
> be placed in a javascript array. Right now I have a normal list
> element and a media placeholder on the pages. I have the list place
> holder commented out, followed by the media place holder in the
> array.
>
> <script type="text/javascript">
>     /*
>     <![CDATA[*/
>     var el = "<%stf_elementName%>";
>     var bgimg = new Array( <!IoRangeList>/*<%lst_Images%>*/ "<
> %med_Image%>", <!/IoRangeList>
>     );
>     var random = Math.round((bgimg.length - 1) * Math.random());
>     var cssStr = "#" + el + " { background: url(" + bgimg[random] + ")
> no-repeat top left } ";
>     var style = document.createElement("style"); style.setAttribute
> ("type", "text/css");
>     if (style.styleSheet) { style.styleSheet.cssText = cssStr; }
>     else { var cssText = document.createTextNode(cssStr);
> style.appendChild(cssText); } document.getElementsByTagName("head")
> [0].appendChild(style); /*]]>
>     */
> </script>
>
> Now above this I have some code to allow users to add pages to the
> list (thereby adding images to the array), but it doesn't seem to be
> working.
>
> I am running into two problems.
>
> 1) The javascript array, although populated doesn't appear to be
> working.
> 2) Although I have checked to see if the LastIndex.Id is the same as
> the parent of the Javascript file (a utility page that should never be
> published), the smartedit code that resides within this query still
> appears on all pages.
>
> Help me? Please?!

--

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