PDA

View Full Version : Two Swiss Army Slideshows in one .aspx page



mmfarmani
07-07-2012, 09:21 PM
Hello,
I’m trying to design two slideshows in one .aspx page. In HTML it’s easy just by writing codes in Head and Body parts. My problem is how to define the head part with ASP coding. How to have these codes :

<script type="text/javascript">
var preload_ctrl_images = true;
var previmg = 'left.gif';
var stopimg = 'stop.gif';
var playimg = 'play.gif';
var nextimg = 'right.gif';
var slides = [];
slides[0] = ["Images/Slides/A.jpg", "A"];
slides[1] = ["Images/Slides/B.jpg", "B"];
slides[2] = ["Images/Slides/C.jpg", "C"];
var slides2 = [];
slides2[0] = ["Images/Ads/D.jpg", "D"];
slides2[1] = ["Images/Ads/E.jpg", "E"];
slides2[2] = ["Images/Ads/F.jpg", "F"];
</script>
<script src="swissarmy.js" type="text/javascript">
</script>

On top of the
<asp:content ……>
.
.
.

Appreciated your reply in advance

ApacheTech
07-07-2012, 10:38 PM
Are you using Master Pages? Which Framework are you using? Are you using a ScriptManager for AJAX calls?

jscheuer1
07-08-2012, 01:14 AM
.
Please post about Dynamic Drive Scripts in the Dynamic Drive Scripts Help section here where I've moved this thread, and:

Warning: Please include a link to the DD script(s) in question in your post. See this post (http://www.dynamicdrive.com/forums/showpost.php?p=7) for more information.

I assume you mean:

http://www.dynamicdrive.com/dynamicindex14/swissarmy/index.htm

If so, what you have there so far looks OK. You don't have the property for image buttons for either slideshow, so it should be:


<script type="text/javascript">
var preload_ctrl_images = false;
var slides = [];
slides[0] = ["Images/Slides/A.jpg", "A"];
slides[1] = ["Images/Slides/B.jpg", "B"];
slides[2] = ["Images/Slides/C.jpg", "C"];
var slides2 = [];
slides2[0] = ["Images/Ads/D.jpg", "D"];
slides2[1] = ["Images/Ads/E.jpg", "E"];
slides2[2] = ["Images/Ads/F.jpg", "F"];
</script>
<script src="swissarmy.js" type="text/javascript">
</script>

On top of the
<asp:content >
.
.
.

As long as the swissarmy.js script is in the same folder as the page with the above code, and the images are where the code designates, all you need in the body of the page is:


<script type="text/javascript">
new inter_slide(slides)
</script>

and:


<script type="text/javascript">
new inter_slide(slides2)
</script>

The first one will present a slideshow of the slides array. The second will present a slideshow of the slides2 array.

These in body scripts should be placed in the body where you want each slideshow to show up.

If you want more help, please include a link to the page on your site that contains the problematic code so we can check it out.

mmfarmani
07-08-2012, 07:13 AM
I got it solved. I appreciate your help.....