PDA

View Full Version : Step Carousel Viewer links into iframe



mastubbs
10-22-2008, 11:12 PM
1) Script Title: Step Carousel Viewer v1.6.1

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/stepcarousel.htm

3) Describe problem:

Hi guys

I have two questions was wondering if anyone could help me out? The 1st i guess is easy but im a bit of a js newb. I want to make it so on clicking images from the carousel, pages load into an iframe (because i want to use the script as a sort of menu) . I have read the docs but no joy. I have tried

<div class="panel">
<a href="http://othersite.com" target="prdfrm2"><img src="http://mysite.com/imgs/3.jpg" /></a></div>

but the othersite.com loads into a new window not into the iframe prdfrm2. Any ideas?

The second question: is it poss to have a description under each image in a text box?

Thanks for any replies.

Matt

jscheuer1
10-22-2008, 11:32 PM
Two possible reasons why that isn't working:


The script is using the target attribute for something else.

You have no iframe with a name attribute set to 'prdfrm2'.


Please post a link to the page on your site that contains the problematic code so we can check it out.

mastubbs
10-23-2008, 03:05 PM
Hi John,

Thanks for your reply. the page URL is http://cart3.jaspers-sensations.com/Scripts/imgscrl/testpage.html

Thanks for your help

Matt

jscheuer1
10-23-2008, 03:23 PM
It was 2:


You have no iframe with a name attribute set to 'prdfrm2'.

From your source code:


<iframe id="prdfrm2" src="http://cart3.jaspers-sensations.com/stage/page2.html" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" style="overflow:visible; width:100%; display:none"></iframe>

You have an id attribute set to 'prdfrm2', but no name attribute, try this:


<iframe name="prdfrm2" id="prdfrm2" src="http://cart3.jaspers-sensations.com/stage/page2.html" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" style="overflow:visible; width:100%; display:none"></iframe>

Note: Some browsers will still work with targeting a link to an id of an iframe, but the standard method was for many years the name attribute, and some other browsers (notably IE) still require it.

mastubbs
10-25-2008, 09:08 PM
legend thankyou :)

jscheuer1
10-25-2008, 10:54 PM
In all the 'excitement' I forgot to answer your other question:


1) Script Title: Step Carousel Viewer v1.6.1

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/stepcarousel.htm . . .

The second question: is it poss to have a description under each image in a text box?

That's easy, where you have like:


<div id="mygallery" class="stepcarousel">
<div class="belt">

<div class="panel">
<img src="http://i30.tinypic.com/531q3n.jpg" />
</div>

You can put whatever you want in there, so for a text box, you could have:


<div id="mygallery" class="stepcarousel">
<div class="belt">

<div class="panel">
<img src="http://i30.tinypic.com/531q3n.jpg" />
<br><input type="text" value="My Caption">
</div>

I would prefer ordinary text though, like:


<div id="mygallery" class="stepcarousel">
<div class="belt">

<div class="panel">
<img src="http://i30.tinypic.com/531q3n.jpg" />
<br>My Caption
</div>