Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Something challenging for the Java Wizards.....

Status
Not open for further replies.

123edc

Programmer
Oct 3, 2002
2
US
Evenin'
I just got the "Interactive image slideshow with text description" and I find it a potentially brilliant idea for my site. The only setback is: I'll need to somehow insert a different link with every change of picture/text. Where it read "Description" I have replaced "Site", and for each picture turn there will be a different Site name, the names of which I will need to create different links for. (see html below)

I have tried to insert the usual linking html in numerous places, but to no avail.
I'm really hoping there is a simple solution....
I've looked through quite a few sites with other slideshows, but none with what I need ~ if this script is not alterable, ...maybe another slideshow entirely?
I'll be away until next week, but the importance of this to me is utmost... ~ I can't wait to get this resolved.. MANY THANX..., and to whomsoever solves the riddle, I'll be happy to link your site...... ~: )
Sincerely, William.


O, and if it makes any difference, the Site name does not have to be where the link is created each time...;
it can be the picture or a seperate line saying "GO" , "GO" being the link.... (???)

<p align=&quot;center&quot;><input type=&quot;button&quot; name=&quot;btnPrev&quot; value=&quot;<< Previous&quot; onfiltered=&quot;Prev();&quot;> <input type=&quot;button&quot; name=&quot;bntPlay&quot; value=&quot;Play - Stop&quot; onfiltered=&quot;Play()&quot;> <input type=&quot;button&quot; name=&quot;btnNext&quot; value=&quot; Next >> &quot; onfiltered=&quot;Next();&quot;></p>
<p align=&quot;center&quot;><img name=&quot;_Ath_Slide&quot; onfiltered=&quot;OnImgLoad()&quot;> </p>
<p align=&quot;center&quot;><b>SITE: <SPAN id=&quot;_Ath_FileName&quot;></b> </SPAN> <br>
<b>Number of Pictures: <SPAN id=&quot;_Ath_Img_X&quot;></b>2</SPAN> <strong>of</strong> <b><SPAN id=&quot;_Ath_Img_N&quot;></b>4</SPAN> </p>
<p align=&quot;center&quot;><script language=&quot;__JavaScript1.2&quot; event=&quot;onload&quot;
for=&quot;window&quot;>
main();
</script>
<script language=&quot;__JavaScript1.2&quot;>
/*
Interactive Image slideshow with text description
By Christian Carlessi Salvadó (cocolinks@c.net.gt)
For full source code to this script and more, visit */
g_fPlayMode = 0;
g_iimg = 0;
g_imax = 0;
g_ImageTable = new Array();
function ChangeImage(fFwd)
{
if (fFwd)
{
if (++g_iimg==g_imax)
g_iimg=0;
}
else
{
if (g_iimg==0)
g_iimg=g_imax;
g_iimg--;
}
Update();
}
function Update(){
document.all._Ath_Slide.src = g_ImageTable[g_iimg][0];
document.all._Ath_FileName.innerHTML = g_ImageTable[g_iimg][1];
document.all._Ath_Img_X.innerHTML = g_iimg + 1;
document.all._Ath_Img_N.innerHTML = g_imax;
}
function Play()
{
g_fPlayMode = !g_fPlayMode;
if (g_fPlayMode)
{
btnPrev.disabled = btnNext.disabled = true;
Next();
}
else
{
btnPrev.disabled = btnNext.disabled = false;
}
}
function OnImgLoad()
{
if (g_fPlayMode)
window.setTimeout(&quot;Tick()&quot;, g_dwTimeOutSec*1000);
}
function Tick()
{
if (g_fPlayMode)
Next();
}
function Prev()
{
ChangeImage(false);
}
function Next()
{
ChangeImage(true);
}
function main()
{
Update();
}
////configure below variables/////////////////////////////
//configure the below images and description to your own.
g_ImageTable[g_imax++] = new Array (&quot; &quot;SITE NAME TO BE A LINK&quot;);
g_ImageTable[g_imax++] = new Array (&quot; &quot;Bike Rider&quot;);
g_ImageTable[g_imax++] = new Array (&quot; &quot;Soccer Player&quot;);
g_ImageTable[g_imax++] = new Array (&quot; &quot;Wath Out!!&quot;);
g_ImageTable[g_imax++] = new Array (&quot; &quot;Hurry Up!&quot;);
//extend the above list as desired
g_dwTimeOutSec=2
////End configuration/////////////////////////////
window.onfiltered=Play
</script>
 
By the way..., my site gets about 100k a day ~ maybe an insentive for the one who can solve it, for to have thier link on my site in return.... ...Not bragging; just an insentive.... Cheers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top