Reply
Hyperlinks problem
Old 03-15-2005, 11:57 AM Hyperlinks problem
Novice Talker

Posts: 5
Hello

If anyone can help me on this i would be very grateful.

Basically I´ve adapted a slideshow to fit my page and I want the images in the slideshow to be links. So i have put the code in and tested it and everything seems to work, the curser changes to a hand over the fotos, but when u click nothing happens.

I am a bit stuck what to do next.

web-page www.amalgam-models.co.uk/james/test2.htm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>PORTFOLIO</title>
<link href="port2.css" rel="stylesheet" type="text/css">
<link href="roll4.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">

var SlideShowSpeed = 3000;
var CrossFadeDuration = 2;
var Picture = new Array();
var Caption = new Array();
var showHot = false;
var links = new Array();

Picture[1] = "pic/bcn4.jpg";
Picture[2] = "pic/bcn2.jpg";
Picture[3] = "pic/bcn3.jpg";
Picture[4] = "pic/bcn1.jpg";

Caption[1] = "pic/btn2.gif";
Caption[2] = "pic/btn3.gif";
Caption[3] = "pic/btn4.gif";
Caption[4] = "pic/btn1.gif";

links[1] = "http://www.google.com";
links[2] = "http://www.google.com";
links[3] = "#";
links[4] = "#";

var tss;
var iss;
var jss = 0;
var css = 0;
var pss = Picture.length-1;
var nss = Caption.length-1;
var preLoad = new Array();

for (iss = 1; iss < pss+1; iss++){
preLoad[iss] = new Image();
preLoad[iss].src = Picture[iss];}
var preLoadb = new Array();

for (iss = 1; iss < nss+1; iss++){
preLoadb[iss] = new Image();
preLoadb[iss].src = Caption[iss];}
function control(how){

if (showHot){
if (how=="F") jss = jss + 1;
if (how=="B") jss = jss - 1;
if (how=="F") css = css + 1;
if (how=="B") css = css - 1;
if (jss > (pss)) jss=1;
if (jss < 1) jss = pss;
if (css > (nss)) css=1;
if (css < 1) css = nss;
if (document.all){

document.images.PictureBox.style.filter="blendTran s(duration=2)";
document.images.PictureBox.style.filter="blendTran s(duration=CrossFadeDuration)";
document.images.PictureBox.filters.blendTrans.Appl y();}
document.images.PictureBox.src = preLoad[jss].src;
document.images.CaptionBox.src = preLoadb[css].src;

if (document.all) document.images.PictureBox.filters.blendTrans.Play ();
}}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
for (var i=1; i<Picture.length; i++) {
document.PictureBox.src = Picture[i];
document.theLink.href = links[i];
}
</script>
</head>
<body onLoad="showHot=true;self.focus(); MM_preloadImages('pic/arr1b.gif','pic/arr2b.gif','pic/bot1.gif','pic/bot2.gif','pic/bot4.gif','pic/bot5.gif','pic/bot6.gif')">

<div class="container">
<div class="menu"><div class="logo"></div>
<div class="nav"><a href="home.htm">HOME&nbsp;&nbsp;</a><a href="http://www.yousite.com/aboutus.html">&nbsp;&nbsp;ABOUT&nbsp;US&nbsp;&nbsp ;</a><a href="whatwedo.htm">&nbsp;&nbsp;WHAT&nbsp;WE&nbsp; DO&nbsp;&nbsp;</a><a href="http://www.yoursite.com/portfolio.html">&nbsp;&nbsp;PORTFOLIO&nbsp;&nbsp;</a><a href="http://www.yoursite.com/contact.html">&nbsp;&nbsp;CONTACT</a></div>
</div>
<div class="topbox"><a href="#" class="ro1"></a><a href="#" class="ro2" onMouseOver="MM_swapImage('beijing','','pic/bot1.gif',1)" onMouseOut="MM_swapImgRestore()"></a><a href="#" class="ro3"></a><a href="#" class="ro4"></a><a href="#" class="ro5"></a><a href="#" class="ro6"></a></div>
<div class="botbox">
<div class="textbox">
<p>BEIJING BLAH BLAH BLAH </p>
<p>&nbsp;</p>
<p>I really dont know what else to write but I dont really want to write just any old rubbish, which is very tempting because i am bloody knackered.</p>
<p>&nbsp;</p>
<p>Anyway I hope all of this works because if it doesnt I am going to cry.</p>
<p>&nbsp;</p>
<p>This is hopefully the finished layout, and I am still really tired and would really like to eat some chocolat.</p>
<p>&nbsp;</p>
<p>I hope this is enough space to fit all the text I think it will be because I have increased the space </p>
<p>&nbsp;</p>
</div>

<div class="btnbox"><img src="pic/btn1.gif" name=CaptionBox width=60 height=22></div>

<table width="390" border="0" cellspacing="0" cellpadding="0" align="right">
<tr>
<td width="330"><a href="#" name="theLink"><img src="pic/bcn1.jpg" name=PictureBox width=330 height=220 border=0></a></td>
<td width="60" valign="bottom"><a href="javascript:control('F');" class="aro2" ></a><a href="javascript:control('B');" class="aro1"></a></td>
</tr>
</table>
</div>
<div class="endbox"><img src="pic/blank.gif" name="beijing"></div>
</div>
</body>
</html>
jamie smith is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Old 03-20-2005, 01:50 PM
Marc Timberlake's Avatar
Ultra Talker

Posts: 300
Works fine for me.... slideshow images go to either google or top of page etc. Perhaps it's your popup blocker or something?
Marc Timberlake is offline
Reply With Quote
View Public Profile Visit Marc Timberlake's homepage!
 
Reply     « Reply to Hyperlinks problem
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.12336 seconds with 13 queries