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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

adding to navigation gives error

Status
Not open for further replies.

marieainey

Technical User
Mar 29, 2005
19
CA
inherited page, tried to add to navigation following the code provided but i get an "expected error" on several lines. can anyone help?

Code:
<html>
<head><title></title>
<script language="javascript">
<!--
if(document.images){
	H_contacton =new Image(); H_contacton.src="images/H_contacton.gif";H_contactoff =new Image(); H_contactoff.src="images/H_contactoff.gif";
	H_complainton =new Image(); H_complainton.src="images/H_complainton.gif";H_complaintoff =new Image(); H_complaintoff.src="images/H_complaintoff.gif";
	H_bulletinsoff =new Image(); H_bulletinsoff.src="images/H_bulletinsoff.gif";H_bulletinson =new Image(); H_bulletinson.src="images/H_bulletinson.gif";
	
	H_consumeron =new Image(); H_consumeron.src="images/H_consumeron.gif";H_consumeroff =new Image(); H_consumeroff.src="images/H_consumeroff.gif";
	H_becomeoff =new Image(); H_becomeoff.src="images/H_becomeoff.gif";H_becomeon =new Image(); H_becomeon.src="images/H_becomeon.gif";
	H_brokeroff =new Image(); H_brokeroff.src="images/H_brokeroff.gif";H_brokeron =new Image(); H_brokeron.src="images/H_brokeron.gif";
	H_newsoff =new Image(); H_newsoff.src="images/H_newsoff.gif";H_newson =new Image(); H_newson.src="images/H_newson.gif";
	
	H_1off =new Image(); H_1off.src="images/H_1.gif";H_1on =new Image(); H_1on.src=H_1off.src;
	H_2off =new Image(); H_2off.src="images/H_2.gif";H_2on =new Image(); H_2on.src=H_2off.src;
	H_3off =new Image(); H_3off.src="images/H_3.gif";H_3on =new Image(); H_3on.src=H_3off.src;
	H_4off =new Image(); H_4off.src="images/H_4.gif";H_4on =new Image(); H_4on.src=H_4off.src;
	H_5off =new Image(); H_5off.src="images/H_5.gif";H_5on =new Image(); H_5on.src=H_5off.src;
	H_6off = new Image(); H_6off.src="images/H_6.gif";H_6on =new Image(); H_6on.src=H_6off.src;
	H_7off =new Image(); H_7off.src="images/H_7.gif";H_7on =new Image(); H_7on.src=H_7off.src;
	H_8off =new Image(); H_8off.src="images/H_8.gif";H_8on =new Image(); H_8on.src=H_8off.src;
	H_9off =new Image(); H_9off.src="images/mkt/H_9.gif";H_9on =new Image(); H_9on.src=H_9off.src;
	H_10off =new Image(); H_10off.src="images/mkt/H_10.gif";H_10on =new Image(); H_10on.src=H_10off.src;
	H_11off =new Image(); H_11off.src="images/H_11.gif";H_11on =new Image(); H_11on.src=H_11off.src;	
	H_12off =new Image(); H_12off.src="images/H_12.gif";H_12on =new Image(); H_12on.src=H_12off.src;
	H_13off =new Image(); H_13off.src="images/H_13.gif";H_13on =new Image(); H_13on.src=H_13off.src;
	H_14off =new Image(); H_14off.src="images/H_14.gif";H_14on =new Image(); H_14on.src=H_14off.src;	
	
	H_consum1off = new Image(); H_consum1off.src="images/H_consum1off.gif";H_consum1on =new Image(); H_consum1on.src="images/H_consum1on.gif";
	H_consum2off =new Image(); H_consum2off.src="images/H_consum2off.gif";H_consum2on =new Image(); H_consum2on.src="images/H_consum2on.gif";
	H_consum3off =new Image(); H_consum3off.src="images/H_consum3off.gif";H_consum3on =new Image(); H_consum3on.src="images/H_consum3on.gif";
	H_consum4off =new Image(); H_consum4off.src="images/H_consum4off.gif";H_consum4on =new Image(); H_consum4on.src="images/H_consum4on.gif";
	H_consum5on =new Image(); H_consum5on.src="images/H_consum5.gif";H_consum5off = new Image(); H_consum5off.src=H_consum5on.src;
	H_become2off =new Image(); H_become2off.src="images/H_become2.gif";H_become2on =new Image(); H_become2on.src=H_become2off.src;
	H_become3off =new Image(); H_become3off.src="images/H_become3.gif";H_become3on =new Image(); H_become3on.src="images/H_become3.gif";
	H_become4off =new Image(); H_become4off.src="images/H_become4off.gif";H_become4on =new Image(); H_become4on.src="images/H_become4on.gif";
	H_become5off =new Image(); H_become5off.src="images/H_become5off.gif";H_become5on =new Image(); H_become5on.src="images/H_become5on.gif";
	H_become6off =new Image(); H_become6off.src="images/H_become6off.gif";H_become6on =new Image(); H_become6on.src="images/H_become6on.gif";
	H_become7off =new Image(); H_become7off.src="images/H_become7off.gif";H_become7on =new Image(); H_become7on.src="images/H_become7on.gif";
	H_become8off =new Image(); H_become8off.src="images/H_become8.gif";H_become8on = new Image(); H_become8on.src=H_become8off.src;
	H_broker3off =new Image(); H_broker3off.src="images/H_broker3.gif";H_broker3on =new Image(); H_broker3on.src=H_broker3off.src;
	H_broker4off =new Image(); H_broker4off.src="images/H_broker4off.gif";H_broker4on =new Image(); H_broker4on.src="images/H_broker4on.gif";
	H_broker5off =new Image(); H_broker5off.src="images/H_broker5off.gif";H_broker5on =new Image(); H_broker5on.src="images/H_broker5on.gif";
	H_broker6off =new Image(); H_broker6off.src="images/H_broker6off.gif";H_broker6on =new Image(); H_broker6on.src="images/H_broker6on.gif";
	H_broker7off =new Image(); H_broker7off.src="images/H_broker7off.gif";H_broker7on =new Image(); H_broker7on.src="images/H_broker7on.gif";
	H_broker8off =new Image(); H_broker8off.src="images/H_broker8off.gif";H_broker8on = new Image(); H_broker8on.src="images/H_broker8on.gif";
	H_broker9off =new Image(); H_broker9off.src="images/mkt/H_broker9off.gif";H_broker9on = new Image(); H_broker9on.src="images/mkt/H_broker9on.gif";
	H_broker10off =new Image(); H_broker10off.src="images/mkt/H_broker10off.gif";H_broker10on = new Image(); H_broker10on.src="images/mkt/H_broker10on.gif";
	H_broker11off =new Image(); H_broker11off.src="images/H_broker11off.gif";H_broker11on = new Image(); H_broker11on.src="images/H_broker11on.gif";
	H_news9off =new Image(); H_news9off.src="images/H_news9off.gif";H_news9on = new Image(); H_news9on.src="images/H_news9on.gif";
	H_news10off =new Image(); H_news10off.src="images/H_news10off.gif";H_news10on = new Image(); H_news10on.src="images/H_news10on.gif";
	H_news11off =new Image(); H_news11off.src="images/H_news11off.gif";H_news11on = new Image(); H_news11on.src="images/H_news11on.gif";
	H_bulletins10off =new Image(); H_bulletins10off.src="images/H_bulletins10off.gif";H_bulletins10on = new Image(); H_bulletins10on.src="images/H_bulletins10on.gif";
	H_bulletins12off =new Image(); H_bulletins12off.src="images/H_bulletins12off.gif";H_bulletins12on = new Image(); H_bulletins12on.src="images/H_bulletins12on.gif";
	H_bulletins13off =new Image(); H_bulletins13off.src="images/H_bulletins13off.gif";H_bulletins13on = new Image(); H_bulletins13on.src="images/H_bulletins13on.gif";
	H_bulletins14off =new Image(); H_bulletins14off.src="images/H_bulletins14off.gif";H_bulletins14on = new Image(); H_bulletins14on.src="images/H_bulletins514on.gif";
}

subImg = new Array(14)
subImg[1] = "1`H_consum1`co_license.cfm`2`H_1`#top`3`H_1`#top`4`H_1`#top`5`H_1`#top"//all available in the first position
subImg[2] = "1`H_consum2`co_faqs.html`2`H_2`#top`3`H_2`#top`4`H_2`#top`5`H_2`#top"
subImg[3] = "1`H_consum3`co_faqs.html`2`H_become3`#top`3`H_broker3`#top`4`H_3`#top`5`H_3`#top"
subImg[4] = "1`H_4`#top`2`H_become4`be_howto.html`3`H_broker4`br_conted.html`4`H_4`#top`5`H_4`#top"
subImg[5] = "1`H_5`#top`2`H_become5`be_study.html`3`H_broker5`br_spotchk.html`4`H_5`#top`5`H_5`#top"
subImg[6] = "1`H_6`#top`2`H_become6`be_retain.html`3`H_broker6`br_license.html`4`H_6`#top`5`H_6`#top"
subImg[7] = "1`H_7`#top`2`H_become7`be_faqs.html`3`H_broker7`br_brlicense.html`4`H_7`#top`5`H_7`#top"
subImg[8] = "1`H_8`#top`2`H_become8`#top`3`H_broker8`br_forms.html`4`H_become3`#top`5`H_8`#top"
subImg[9] = "1`H_9`#top`2`H_9`#top`3`H_broker9`br_market.html`4`H_news9`headlines.asp`5`H_9`#top"
subImg[10] = "1`H_10`#top`2`H_10`#top`3`H_broker10`br_dept.html`4`H_news10`ribo_ar2005.pdf`5`H_bulletins10`[URL unfurl="true"]http://www.e-laws.gov.on.ca/DBLaws/Statutes/English/90r19_e.htm"[/URL]
subImg[11] = "1`H_11`#top`2`H_11`#top`3`H_broker11`[URL unfurl="true"]http://membership.ribo.com`4`H_news11`bulletins\bulletins.html`5`H_11`#top"[/URL]
subImg[12] = "1`H_12`#top`2`H_12`#top`3`H_12`#top`4`H_become12`#top`5`H_bulletins12`Code%20of%20Conduct-January2005.pdf"
subImg[13] = "1`H_13`#top`2`H_13`#top`3`H_13`#top`4`H_13`#top`5`H_bulletins13`By-laws-Jan2005(9).pdf"
subImg[14] = "1`H_14`#top`2`H_14`#top`3`H_14`#top`4`H_14`#top`5`H_bulletins14`ontario_regulations.html"

var imgflag = 0;
var whichparse = 0;

function changeImg(imgNam, onoff){
	if(document.images){
		document.images[img]am[/img].src=eval(imgNam+onoff+'.src');
		if(imgNam!="H_consumer" && imgNam!="H_become" && imgNam!="H_broker" && imgNam!="H_news" && imgNam!="H_bulletins"){imgflag=0;
			for(i=1;i<=14;i++){
				document.images['slot'+i].src=eval('H_'+i+'off.src');
			}
			document.images['H_broker'].src=H_brokeroff.src;
			document.images['H_consumer'].src=H_consumeroff.src;
			document.images['H_become'].src=H_becomeoff.src;
			document.images['H_news'].src=H_newsoff.src;
			document.images['H_bulletins'].src=H_bulletinsoff.src;
		}
		if(imgNam=="H_consumer"){imgflag=1;}
		if(imgNam=="H_become"){imgflag=2;}
		if(imgNam=="H_broker"){imgflag=3;}
		if(imgNam=="H_news"){imgflag=4;}
		if(imgNam=="H_bulletins"){imgflag=5;}
		var whichparse = (imgflag<=2)?(imgflag==1)?1:4:7:9:10;
		if(imgflag!=0 && onoff=="on"){
			if(imgflag==3){document.images['H_broker'].src=H_brokeroff.src;}
			if(imgflag==1){document.images['H_consumer'].src=H_consumeroff.src;}
			if(imgflag==2){document.images['H_become'].src=H_becomeoff.src;}
			if(imgflag==4){document.images['H_news'].src=H_newsoff.src;}
			if(imgflag==5){document.images['H_bulletins'].src=H_bulletinsoff.src;}
			for(i=1;i<=14;i++){
				document.images['slot'+i].src=eval(parseArr(subImg[i],whichparse)+"off.src");
			}
		}
	} 
}

function parseArr(arrValue,arrPlace){
	var indx=0;
	var arrlen=0;
	if(arrValue==null || arrValue==" " || arrValue==""){
		return " ";
	}
	for(var i=0;i<arrPlace;i++){
    	indx = (arrPlace==0)?0:arrValue.indexOf("`",indx+1)+1;
	}
	arrlen=(arrValue.indexOf("`",indx)!=-1)?arrValue.indexOf("`",indx+1):arrValue.length;
	return arrValue.substring(indx,arrlen);
}

function changeSubImg(subname, subnum, onoff){
	if(document.images){
		var whichparse = (imgflag<=2)?(imgflag==1)?1:4:7:9:10;
		if(imgflag!=0){
			imgrep = parseArr(subImg[subnum],whichparse);
			if(imgrep=="H_consum3"){
				document.images['slot2'].src=eval("H_consum2"+onoff+".src");
			}
			document.images[subname].src=eval(imgrep+onoff+".src");
		}
	}
}

function goLink(linknum){
	var whichparse = (imgflag<=2)?(imgflag==1)?2:5:8:10:12;
	if(imgflag!=0){
		location.href=parseArr(subImg[linknum], whichparse);
	}
}

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];}
}
//-->
</script>
</head>
<body link="#3366cc" vlink="#3366cc" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr bgcolor="#0066CC"><td colspan="6" background="images/h_top1bg.gif"><img src="images/h_top1_new.jpg" alt="Registered Insurance Brokers of Ontario - Celebrating 25 Years" width="800" height="125"></td>
<tr>

<td width="25%" rowspan="3" valign="top" bgcolor="#FFFFFF"><div align="left"><a href="co_index.html" onMouseOut="changeImg('H_consumer','off');self.status='';return true;"onMouseOver="changeImg('H_consumer','on');self.status='Consumer Information';return true;"><img src="images/H_consumeroff.gif" width="259" height="68" alt border="0" name="H_consumer"></a><br>
      <a href="be_index.html" onMouseOut="changeImg('H_become','off');self.status='';return true;" onMouseOver="changeImg('H_become','on');self.status='Becoming a Broker';return true;"><img src="images/H_becomeoff.gif" width="259" height="79" alt border="0" name="H_become"></a><br>
      <img src="images/H_between.gif" width="259" height="21" ><br>
      <a href="br_index.html" onMouseOut="changeImg('H_broker','off');self.status='';return true;"onMouseOver="changeImg('H_broker','on');self.status='Broker Resources';return true;"><img src="images/H_brokeroff.gif" alt height="70" width="259" border="0" name="H_broker"></a><br>
      <a href="headlines.asp" onMouseOut="changeImg('H_news','off');self.status='';return true;" onMouseOver="changeImg('H_news','on');self.status='News and Updates';return true;"><img src="images/H_newsoff.gif" alt border="0" name="H_news" WIDTH="259" HEIGHT="58"></a><br>
      <table border="0" width="100%" cellpadding="0" cellspacing="0">
    <td width="31%" valign="top"><img src="images/H_mid.gif" alt border="0" width="97" height="21"><img src="images/H_complaintoff2.gif" width="97" height="33" alt border="0" name="H_complaint" align="left" hspace="0" vspace="0"></td>
<td width="69%" align="left" valign="top"><a href="bulletins/bulletins.html" onMouseOver="changeImg('H_bulletins','on');self.status='Bulletins';return true;" onMouseOut="changeImg('H_bulletins','off')"><img src="images/H_bulletinsoff.gif" width="162" height="34" alt border="0" name="H_bulletins"></a><br><img src="images/H_end.gif" alt border="0" WIDTH="162" HEIGHT="20"></td>
      </table>
</div></td>
<td width="15%" rowspan="3" valign="top" bgcolor="#FFFFFF"><div align="left"><img src="images/H_spacer.gif" width="157" height="28" ><br>
        <a href="javascript:goLink(1)" onMouseOver="changeSubImg('slot1',1,'on');self.status='';return true;" onMouseOut="changeSubImg('slot1',1,'off')"><img src="images/H_1.gif" width="157" height="40" alt border="0" name="slot1"></a><br>
        <a href="javascript:goLink(2)" onMouseOver="changeSubImg('slot2',2,'on');self.status='';return true;" onMouseOut="changeSubImg('slot2',2,'off')"><img src="images/H_2.gif" width="157" height="17" alt border="0" name="slot2"></a><br>
        <a href="javascript:goLink(3)" onMouseOver="changeSubImg('slot3',3,'on');self.status='';return true;" onMouseOut="changeSubImg('slot3',3,'off')"><img src="images/H_3.gif" width="157" height="23" alt border="0" name="slot3"></a><br>
        <a href="javascript:goLink(4)" onMouseOver="changeSubImg('slot4',4,'on');self.status='';return true;" onMouseOut="changeSubImg('slot4',4,'off')"><img src="images/H_4.gif" width="157" height="19" alt border="0" name="slot4"></a><br>
        <a href="javascript:goLink(5)" onMouseOver="changeSubImg('slot5',5,'on');self.status='';return true;" onMouseOut="changeSubImg('slot5',5,'off')"><img src="images/H_5.gif" width="157" height="20" alt border="0" name="slot5"></a><br>
        <a href="javascript:goLink(6)" onMouseOver="changeSubImg('slot6',6,'on');self.status='';return true;" onMouseOut="changeSubImg('slot6',6,'off')"><img src="images/H_6.gif" width="157" height="21" alt border="0" name="slot6"></a><br>
        <a href="javascript:goLink(7)" onMouseOver="changeSubImg('slot7',7,'on');self.status='';return true;" onMouseOut="changeSubImg('slot7',7,'off')"><img src="images/H_7.gif" width="157" height="19" alt border="0" name="slot7"></a><br>
        <a href="javascript:goLink(8)" onMouseOver="changeSubImg('slot8',8,'on');self.status='';return true;" onMouseOut="changeSubImg('slot8',8,'off')"><img src="images/H_8.gif" width="157" height="19" alt border="0" name="slot8"></a><br>
        <a href="javascript:goLink(11)" onMouseOver="changeSubImg('slot11',11,'on');self.status='';return true;" onMouseOut="changeSubImg('slot11',11,'off')"><img src="images/h_11.gif" width="157" height="19" alt border="0" name="slot11"></a><br>   
        <a href="javascript:goLink(9)" onMouseOver="changeSubImg('slot9',9,'on');self.status='';return true;" onMouseOut="changeSubImg('slot9',9,'off')"><img src="images/mkt/H_9.gif" width="157" height="19" alt border="0" name="slot9"></a><br>
        <a href="javascript:goLink(10)" onMouseOver="changeSubImg('slot10',10,'on');self.status='';return true;" onMouseOut="changeSubImg('slot10',10,'off')"><img src="images/H_10.gif" width="157" height="26" alt border="0" name="slot10"></a><br>
        <a href="javascript:goLink(12)" onMouseOver="changeSubImg('slot12',12,'on');self.status='';return true;" onMouseOut="changeSubImg('slot12',12,'off')"><img src="images/h_12.gif" name="slot12" width="157" height="20" border="0"></a><br>
        <a href="javascript:goLink(13)" onMouseOver="changeSubImg('slot13',13,'on');self.status='';return true;" onMouseOut="changeSubImg('slot13',13,'off')"><img src="images/h_13.gif" name="slot13" width="157" height="20" border="0"></a><br>
        <a href="javascript:goLink(14)" onMouseOver="changeSubImg('slot14',14,'on');self.status='';return true;" onMouseOut="changeSubImg('slot14',14,'off')"><img src="images/h_14.gif" name="slot14" width="157" height="20" border="0"></a>
</div>
<td width="25%" valign="bottom" bgcolor="#FFFFFF"><p>&nbsp;</p>
  <p><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><font size="2" color="#3366cc"><b></b></font></font> </p>
  </td>
<td width="15%" valign="top" bgcolor="#FFFFFF">&nbsp;</td>
<td width="20%" rowspan="3" align="right" valign="top" bgcolor="#FFFFFF"><img src="images/ride%20side.jpg" width="147" height="350" align="right"></td>
  <tr>
    <td colspan="2" valign="top" bgcolor="#FFFFFF"><p><br>
      <img src="images/serve.gif" alt="Serve the Public and Regulate the Profession" width="439" height="25"></p>
    <p>&nbsp;</p></td>
  <tr>
    <td colspan="2" valign="top" bgcolor="#FFFFFF"><p>&nbsp;</p>
    </td>
  <tr>
    <td height="125" colspan="5" valign="top" bgcolor="#FFFFFF" background="images/h_bottom_bg.gif"><div align="left">
      <table width="50%"  border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td height="2" colspan="3"><p><br>
          </p>
            </td>
        </tr>
        <tr>
          <td><div align="center"></div></td>
        </tr>
      </table>
    </div></td>
</table>


<table border="0">
<p>&nbsp;</p>
</body>
</html>
 
what have you added? what errors are you getting?

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
added in flag 4 & 5, slots 9 & 10 subimg, 10 & 12 for golink get expected error for most lines.
 
do you have a URL to the page

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
this is the line causing the problem
Code:
		var whichparse = (imgflag<=2)?(imgflag==1)?1:4:7:9:;

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
I can see why. I understand that i need to add in extra slots (9 and 10 in this case) to allow for rollovers for flags 4 & 5 to work but when i add them i get the error. Why is that? What am i doing wrong? I can see that I made a BIG mistake there and didn't add the second number after the : but what is causing the expected error otherwise when the line is completed?
 
there is also an error on this line
Code:
document.images['slot'+i].src=eval(parseArr(subImg[i],whichparse)+"off.src");

I can't help you with the
(imgflag<=2)?(imgflag==1)?1:4:7:9:;
as i have no idea what this is doing. what did the line look like before you changed it?


"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
shows a botched up page that i'm trying to fix.

someone had tried to incorporated macromedia rollovers for the bottom two buttons and screwed up the original javascript navigation that had existed before.
 

(imgflag<=2)?(imgflag==1)?1:4:7;

now I beleive this is some type of condition, true, false logic, though i'm having dificulty fully understanding it... can you help...

a simple useage is ...
Code:
var printme = ( errorcode == 0 ? "OK" : "error" );

what that is saying is if errorcode equal 0 then printme equals "OK" otherwise printme equals "error", so if imgflag <=2 what should whichparse equal? and if imgflag = 1 what should whichparse equal, etc...

if we can break it down to the correct logic , we can work out what whichparse should be when imgflag = 3 , 4 or 5


"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
the 1, 4 & 7 correspond to the 1st image in the rollovers for the first 3 imgflags that worked previously. the other reference of 2, 5 & 8 is there second slot in the navigation. I'm not sure why it's saying greater than 2 is equal to 1 and then equal to those slots for the rollovers but then won't work if i add in two more slots.

the imgflag<=2 is the previous way it was referenced on the page, as there used to be only 3 rollovers but we now require 5 menus. i thought it would be easy to do, but apparently not.
 
lol - it is easier than the code , that's the problem, imgflag sets the whichparse for the popout menu, which is defined by the array subimg, you need to know what subimg to set for each imgflag , once you know that the logic should be straight forward.

so all you need to do is work out what the subimg array number should be for each imgflag and the rest should fall into place.

hope that makes sense.

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
yeah, i GET all of that.

the problem is the sumimgs added for flags 4 and 5 WON'T appear. if i put images under 3 in slots 11-14, all added in new, they appear, but for flags 4 & 5, nadda.

the main issue is getting flags 4 & 5 and their subimg arrays to appear.
 
so have you solved the JS error with (imgflag<=2)?(imgflag==1)?1:4:7:9:;

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top