PDA

View Full Version : Using HTML within a Javascript routine



ggeoff
Jun 28th, 2008, 09:27 PM
Hi my first post. I am using an add on to Frontpage 2002 that I bought from Webs Unlimited, it is called J-Bots. At present I am implementing a slide show in one of my webs. I want to add text underneath each photo in the slide show, and thought that I should be able to add the text between each slide but don't know how to do this. I think I might need to escape out of the routine to add HTML and then return to Java where I left off to see the next slide, and escape again to HTML etc. After which the text to accompany the next slide would need to be accessed. So I need to add text to accompany each slide, if the user clicks on the forward or back button. Part of the routine is:

// Webs Unlimited's J-BOTS FrontPage JavaScript Generator version 4.0
// Copyright Webs Unlimited 1998 All rights reserved - http://WebsUnlimited.com
// make an array of length n Needed for older javascript browsers
var iImg200611Which = 0;
Img200611 = new Array();
var i = -1;
Img200611[++i] = new Image();
Img200611[i].src = "g1_0064.jpg";
Img200611[++i] = new Image();
Img200611[i].src = "images/g1_0065.jpg";
Img200611[++i] = new Image();
Img200611[i].src = "images/g1_0066.jpg";
Img200611[++i] = new Image();
Img200611[i].src = "images/g1_0067.jpg";
Img200611[++i] = new Image();


I don't know whether this is a simple problem or not, but hope so as it would be nice to have the option to add text to accompany each slide.

jmrker
Jun 29th, 2008, 02:02 AM
While this doesn't use your approach, I think this is what you are looking for.
See: http://javascript.internet.com/image-effects/simple-image-gallery.html

ggeoff
Jun 29th, 2008, 01:32 PM
Thanks jmrker,
But the J-Bots add-on for Frontpage saves the user from having to create external files and add code to the web page as it does it for the web designer. The problem is that I need to have the additional option to add text to each image. This is a link to where I am implementing the slide show: http://www.freshfordsomerset.co.uk/garden_2.htm