View Full Version : tweaking the featured content slider v2.0

06-04-2008, 07:49 PM
1) Script Title: featured content slider

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/featuredcontentslider.htm

3) Describe problem:
1. i can't get the images to show up as i am referencing them through code so they're not hard coded into the div statement
2. if i leave the .css file as is, only the pagination shows up. if i delete the .slider (position: relative;), i can see text content but the box is double the length.

here's the code i have for problem 1:
- i have the image sources in html set to

<img src="" id="img1">

in my 1.1 code i'm trying to reference the src so i have:

dim img1 as image
img1=new image
value = placeholder.src

value is giving me the correct url, but it won't display the image?

problem 2: this is the updated version i have of contentslider.css:

/*position: relative; /*leave as is*/
overflow: hidden; /*leave as is*/
border: 1px solid black;
border-bottom-width: 1px;
width: 400px; /*width of featured content slider*/
height: 294px; /*started @ 250*/

.sliderwrapper .contentdiv{
visibility: hidden; /*leave as is*/
position:absolute; /*leave as is*/
left: 0; /*leave as is*/
top: 0; /*leave as is*/
padding: 5px;
background: blue;
font-weight:bold; /* take out when done kiva:6/3/08*/
width: 390px; /*width of content DIVs within slider. Total width should equal slider's inner width (390+5+5=400) */
height: 100%;
/*-moz-opacity: 1;
opacity: 1;*/

width: 382px; /*Width of pagination DIV. Total width should equal slider's outer width (400+10+10=420)*/
text-align: center;
background-color: navy;
padding: 2px 10px;
color: white;

.pagination a{
padding: 0 5px;
text-decoration: none;
color: #00007D;
background: white;

.pagination a:hover, .pagination a.selected{
color: #000;
background-color: #FEE496;

any help is greatly appreciated

06-04-2008, 09:22 PM
Please post a link to the page on your site that contains the problematic script so we can check it out.

06-05-2008, 01:19 PM
i used the exact script from


06-06-2008, 09:11 AM
It may be the exact script, but what else is on your page may be the culprit, hence we need to see a URL to the problem page.

06-07-2008, 11:12 AM
Problem 1 is simply that you never set the src of the img. Ex.

document['img1'].src = "./happymonkey.jpg"

Problem 2...there are an infinite number of things that could be wrong. Without seeing the site, there's no way anyone could answer :S

06-10-2008, 04:00 PM
sorry for the late response & thank you for responding . . .

ok, i've figured out problem 1. i had to add an <asp:image webcontrol for it to work. i didn't use your approach because i couldn't hardcode the image in HTML, i needed to add it in .net code. so here's what i used:

in my html code i have:
<div id="slider1" class="sliderwrapper">
<div id="Image1" class="contentdiv"><div>
<asp:Image id="img1" runat="server"></asp:Image>
<asp:Label ID="lbl1" Runat="server"></asp:Label><br>

in my code behind for this page i have:
img1.imageurl = "page1.url" *page1 is whereever my source is*

Problem 2: i had to change some of the settings in the css file around & now its ok

Another thing i'd like to have is the ability to start the slide show back up after you've selected a page (maybe a play button). i've seen something here for it, but it was for the old contentslider version. i'll attach the link to my page here in a minute! thx again.

06-11-2008, 02:04 PM
actually guys, i think i'm going to close this thread & open a new one up for the play button. thank you for your help on this one.