This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's Calculator Programming subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. General Coding and Design => Calculator Programming
Author Message
Noob88


Member


Joined: 23 Nov 2005
Posts: 239

Posted: 07 Aug 2006 06:17:51 pm    Post subject:

http://www.tomdsmith.com/blueknightsoh9/index2.html

The website above that I posted a link to is for my uncle's motorcycle club the blue knights. This person started the webpage for the blue knights, but decided to quit, and will not relinquish the website. So, I am assisting my uncle in basic HTML designing for his new website, but the group is intent on keeping the link bar thing that is located in this website. Can anyone show me how to edit the link so that it says different things and so that I can make clicking on each one of them go to another part of the site? If this is too much to just go through in a post, you can contact me on AIM, my username is Yoko123Ono123. Also I think it may be necessary to add that this is in no way copyrighted by the owner, it's just that nobody is familiar with the Javascript language. Any help with this matter would be greatly appreciated.

http://www.tomdsmith.com/blueknightsoh9/index2_scr.js

That is the link to the javascript source.


Last edited by Guest on 07 Aug 2006 06:58:48 pm; edited 1 time in total
Back to top
Darth Android
DragonOS Dev Team


Bandwidth Hog


Joined: 31 May 2003
Posts: 2104

Posted: 07 Aug 2006 07:37:11 pm    Post subject:

1) A menu like that can be easily created in CSS2. I find it's simpler and cleaner code than JS.

You're also missing some files:
[font="courier new;font-size:9pt;line-height:100%;color:darkblue"]menu_opera.js
menu_ns4.js
menu_dom.js
menu_ie4.js

These should be in the same directory as the other js file you found.
Back to top
Noob88


Member


Joined: 23 Nov 2005
Posts: 239

Posted: 09 Aug 2006 09:05:14 am    Post subject:

OkI have realized that what I was trying to do before was impossible, thanks to some help from Goose. Now I have a new problem.
Here is my index.htm file and what it looks like:

Code:
<script type="text/javascript" src="./menu_scr.js">
</script>


<table style="line-height:0px" cellpadding='0' cellspacing='0'><tr><td>
  <img id="lm1tlm0" src="./menu_m1_b.png" alt="" width="160" height="8" /></td></tr>
<tr><td><a id="m1tlm0a" href="java script:void(0);" onmouseover="exM(m1,'m1mn1','m1tlm0',event);chgBg(m1,'m1tlm0',3)" onmouseout="coM(m1,'m1mn1','m1tlm0');chgBg(m1,'m1tlm0',0)">
  <img style="border-style:none" id="m1tlm0" src="./menu_m1_i0.png" alt="" width="160" height="19" /></a></td></tr>
<tr><td>
  <img id="lm1tlm1" src="./menu_m1_s.png" alt="" width="160" height="18" /></td></tr>
<tr><td><a id="m1tlm1a" href="java script:void(0);" onmouseover="exM(m1,'m1mn2','m1tlm1',event);chgBg(m1,'m1tlm1',3)" onmouseout="coM(m1,'m1mn2','m1tlm1');chgBg(m1,'m1tlm1',0)">
  <img style="border-style:none" id="m1tlm1" src="./menu_m1_i1.png" alt="" width="160" height="19" /></a></td></tr>
<tr><td>
  <img id="lm1tlm2" src="./menu_m1_s.png" alt="" width="160" height="18" /></td></tr>
<tr><td><a id="m1tlm2a" href="java script:void(0);" onmouseover="exM(m1,'m1mn3','m1tlm2',event);chgBg(m1,'m1tlm2',3)" onmouseout="coM(m1,'m1mn3','m1tlm2');chgBg(m1,'m1tlm2',0)">
  <img style="border-style:none" id="m1tlm2" src="./menu_m1_i2.png" alt="" width="160" height="19" /></a></td></tr>
<tr><td>
  <img id="lm1tlm3" src="./menu_m1_s.png" alt="" width="160" height="18" /></td></tr>
<tr><td><a id="m1tlm3a" href="java script:void(0);" onmouseover="exM(m1,'m1mn4','m1tlm3',event);chgBg(m1,'m1tlm3',3)" onmouseout="coM(m1,'m1mn4','m1tlm3');chgBg(m1,'m1tlm3',0)">
  <img style="border-style:none" id="m1tlm3" src="./menu_m1_i3.png" alt="" width="160" height="19" /></a></td></tr>
<tr><td>
  <img id="lm1tlm4" src="./menu_m1_s.png" alt="" width="160" height="18" /></td></tr>
<tr><td><a id="m1tlm4a" href="java script:void(0);" onmouseover="exM(m1,'m1mn5','m1tlm4',event);chgBg(m1,'m1tlm4',3)" onmouseout="coM(m1,'m1mn5','m1tlm4');chgBg(m1,'m1tlm4',0)">
  <img style="border-style:none" id="m1tlm4" src="./menu_m1_i4.png" alt="" width="160" height="19" /></a></td></tr>
<tr><td>
  <img id="lm1tlm5" src="./menu_m1_s.png" alt="" width="160" height="18" /></td></tr>
<tr><td><a id="m1tlm5a" href="java script:void(0);" onmouseover="exM(m1,'m1mn6','m1tlm5',event);chgBg(m1,'m1tlm5',3)" onmouseout="coM(m1,'m1mn6','m1tlm5');chgBg(m1,'m1tlm5',0)">
  <img style="border-style:none" id="m1tlm5" src="./menu_m1_i5.png" alt="" width="160" height="19" /></a></td></tr>
<tr><td>
  <img id="lm1tlm6" src="./menu_m1_e.png" alt="" width="160" height="10" /></td></tr>
</table>


here is my menu_scr js file


Code:
var ver='4.0.3D'
var m1=new Object
m1.name='m1'
m1.fnm='menu_m1'
if(!window.lastm||window.lastm<1)lastm=1
m1.v17=null
m1.v17Timeout=''
var maxZ=1000
m1.v18
m1.targetFrame
var docLoaded=false
m1.bIncBorder=true
m1.v29=null
m1.v29Str=''
m1.v55=50
m1.scrollStep=10
m1.fadingSteps=8
m1.itemOverDelay=0
m1.transTLO=0
m1.fixSB=0
m1.v62=0
m1.v21="."
m1.maxlev=1
m1.v22=0
m1.sepH=10
m1.bHlNL=1
m1.showA=1
m1.bVarWidth=0
m1.bShowDel=0
m1.scrDel=0
m1.v23=160
m1.levelOffset=20
m1.bord=2
m1.vertSpace=3
m1.sep=0
m1.v19=false
m1.bkv=0
m1.rev=0
m1.shs=4
m1.shc='#C0C0C0'
m1.xOff=0
m1.yOff=0
m1.xSOff=0
m1.ySOff=2
m1.v20=false
m1.cntFrame=""
m1.menuFrame=""
m1.v24=""
m1.mout=true
m1.iconSize=8
m1.closeDelay=1000
m1.tlmOrigBg="White"
m1.tlmOrigCol="White"
m1.v25=true
m1.v52=true
m1.v60=0
m1.v11=true
m1.bord=0
m1.v10=8
m1.ppLeftPad=2
m1.v54=0
m1.v01=2
m1.tlmHlBg="#FFCC00"
m1.tlmHlCol="White"
m1.borderCol="Black"
m1.menuHorizontal=false
m1.scrollHeight=6
m1.attr=new Array("12px",false,false,"White","White","Black","Verdana,Arial,Helvetica","#0093FF","White","White")
m1mn1=new Array
(
"History","#",0,"",""
,"Meeting Schedule","#",0,"",""
)
m1mn2=new Array
(
"Local News","#",0,"",""
,"National News","#",0,"",""
,"Conventions","#",0,"",""
)
m1mn3=new Array
(
"Items For Sale","#",0,"",""
)
m1mn4=new Array
(
"Blue Knights International","http://blueknights.org/",0,"",""
,"International Police Association","http://www.ipa-usa.org/",0,"",""
,"Police Directory","http://www.officer.com/",0,"",""
,"COPS","http://www.nationalcops.org/",0,"",""
,"NLEOMF","http://www.nleomf.com/",0,"",""
,"Police One","http://www.policeone.com/",0,"",""
,"Cincinnati Police","http://www.cincinnatipolice.org",0,"",""
)
m1mn5=new Array
(
"Local Events","#",0,"",""
,"National Events","#",0,"",""
)
m1mn6=new Array
(
"Board Members","#",0,"",""
,"Members","#",0,"",""
,"Membership","#",0,"",""
,"Webmaster","#",0,"",""
)
absPath=""
if(m1.v19&&!m1.v20){
if(window.location.href.lastIndexOf("\\")>window.location.href.lastIndexOf("/")) {sepCh = "\\" ;} else {sepCh = "/" ;}
absPath=window.location.href.substring(0,window.location.href.lastIndexOf(sepCh)
+1)}
m1.v02=m1.v23
var stp="<img id="
var stq=" width='1' height='1' style='display:none' src='./menu_m1"
document.write(stp+"'m1menubg4'"+stq+"bg4.png'>")
document.write(stp+"'m1menubg5'"+stq+"bg5.png'>")
document.write(stp+"'m1menubg6'"+stq+"bg6.png'>")
document.write(stp+"'m1_bh'"+stq+"_bh.png'>")
document.write(stp+"'m1_b'"+stq+"_b.png'>")
document.write(stp+"'m1_eh'"+stq+"_eh.png'>")
document.write(stp+"'m1_e'"+stq+"_e.png'>")
document.write(stp+"'m1_slh'"+stq+"_slh.png'>")
document.write(stp+"'m1_srh'"+stq+"_srh.png'>")
document.write(stp+"'m1_s'"+stq+"_s.png'>")
document.write(stp+"'pre0m1tlm0'"+stq+"_i0.png'>")
document.write(stp+"'pre1m1tlm0'"+stq+"_i0h.png'>")
document.write(stp+"'pre0m1tlm1'"+stq+"_i1.png'>")
document.write(stp+"'pre1m1tlm1'"+stq+"_i1h.png'>")
document.write(stp+"'pre0m1tlm2'"+stq+"_i2.png'>")
document.write(stp+"'pre1m1tlm2'"+stq+"_i2h.png'>")
document.write(stp+"'pre0m1tlm3'"+stq+"_i3.png'>")
document.write(stp+"'pre1m1tlm3'"+stq+"_i3h.png'>")
document.write(stp+"'pre0m1tlm4'"+stq+"_i4.png'>")
document.write(stp+"'pre1m1tlm4'"+stq+"_i4h.png'>")
document.write(stp+"'pre0m1tlm5'"+stq+"_i5.png'>")
document.write(stp+"'pre1m1tlm5'"+stq+"_i5h.png'>")
document.write("<style type='text/css'>\n.m1CL0,.m1CL0:link{text-decoration:none;color:White; }\n.m1CL0:visited{color:White}\n.m1mit{padding-left:10px;padding-right:10px;color:White; font-family:Verdana,Arial,Helvetica; font-size:12px; padding-top:1px;padding-bottom:1px}\n"+"</"+"style>")
document.write("<script type='text/javascript' src='./menu_dom.js'></"+"script>")


and here is my menu_dom js file

Code:
NS60=(navigator.userAgent.indexOf("Netscape6/6.0")!=-1)
Opera=(navigator.userAgent.indexOf('Opera')!=-1)||(navigator.appName.indexOf('Opera')!=-1)||(window.opera)
Opera7=(Opera&&document.createElement!=null&&document.addEventListener!=null)
IE4=(document.all&&!Opera)
mac=((IE4)&&(navigator.appVersion.indexOf("Mac")!=-1))
DOM=document.documentElement&&!IE4&&!Opera
if(IE4){
av=navigator.appVersion
avi=av.indexOf("MSIE")
if(avi==-1){version=parseInt(av);}else{version=parseInt(av.substr(avi+4));}}
function zz(e,i){
return e?e.document.getElementById(i):document.getElementById(i)}
function f33(p){
if(p&&p.indexOf(':/')==-1&&p.indexOf(':\\')==-1&&p.indexOf('/')!=0) return unescape(absPath)+p
else return p}
function addLoadHandler(lh){
if(lh){
if(!document.loadHandlers){
document.loadHandlers=new Array()
document.loadHandlers[0]=lh
document.lastLoadHandler=0}
else{
document.lastLoadHandler++
document.loadHandlers[document.lastLoadHandler]=lh}}}
addLoadHandler('f29')
addLoadHandler(window.onload)
window.onload=f31
function f32(){return true;}
window.onerror=f32
function getFilter(q){
if(!q ||(q.v11&&q.v60))return ""
if(q.shs>0&&IE4)return "progid:DXImageTransform.Microsoft.Shadow(Color="+q.shc+",direction=135,strength="+q.shs+")"
else if(q.shs<0&&IE4)return "progid:DXImageTransform.Microsoft.Glow(Color="+q.shc+",strength="+(-q.shs)+")"}
function f03(q,pp,id,v27,v26,v30,v09,bLast,v31,parent,target,opt){
if(v26=="-")return q.sepH
var itemType=0
if(v26&&v26.indexOf("(^1)")!=-1)itemType=1
if(v26&&v26.indexOf("(^2)")!=-1)itemType=2
var itemWnd=q.v18.document.createElement("DIV")
pp.appendChild(itemWnd)
if(mac){
var brWnd=q.v18.document.createElement("BR")
pp.appendChild(brWnd)}
f30(itemWnd,"mouseover","f22",false)
f30(itemWnd,"mouseout","f23",false)
f30(itemWnd,"click","f20",false)
f30(itemWnd,"dblclick","f20",false)
itemWnd.owner=pp.id
itemWnd.qId=q.name
itemWnd.id=id
with(itemWnd.style){
position="absolute"
if(itemType==2)top=(v31-q.scrollHeight)+"px"
else top=v31+"px"
if(v27){cursor=(!IE4||version>=6)?"pointer":"hand";}
else{cursor="default";}
if(!color)color=v09 [3]
left=(q.ppLeftPad+q.vertSpace)+"px"
if(!itemType)padding=q.vertSpace+"px"
paddingLeft=(q.ppLeftPad+q.vertSpace+q.v54)+"px"
paddingRight=((q.v01<q.iconSize?q.iconSize:q.v01)+q.vertSpace)+"px"
fontSize=v09[0]
fontWeight=(v09[1])?"bold":"normal"
fontStyle=(v09[2])?"italic":"normal"
fontFamily=v09[6]
textAlign=(q.v22==1?'center':(q.v22==2?'right':'left'))
f04(itemWnd,q.v11?q.v02-q.ppLeftPad-q.v01-2*q.vertSpace:q.v02,2*q.bord)}
if(v30)itemWnd.v30=v30
if(itemType>0){
var arrow=q.v18.document.createElement("IMG")
itemWnd.appendChild(arrow)
var arrowSrc=f33(q.v21)
arrow.src=arrowSrc+"/"+q.fnm+"s"+((itemType==1)?"up":"down")+".gif"
itemWnd.style.textAlign="center"
itemWnd.style.display="none"}
else
itemWnd.innerHTML=v26
if(q.v56&&v27.indexOf(q.v56)==0)
itemWnd.url=q.v57+v27.substring(q.v56.length)
else
itemWnd.url=f33(v27)
itemWnd.f54=v26
itemWnd.target=target
if(v30&&q.showA){
var expandArrow=q.v18.document.createElement("IMG")
itemWnd.appendChild(expandArrow)
var v03=f33(q.v21)
expandArrow.src=v03+"/"+q.fnm+"ia.gif"
with(expandArrow.style){
width=q.iconSize+"px"
height=q.iconSize+"px"
position="absolute"
var itemRect=f19(q,itemWnd)
top=((itemRect.bottom-itemRect.top)/2-q.iconSize/2)+"px"
left=(itemWnd.offsetWidth-q.iconSize-1)+"px"}}
if(opt){
itemWnd.customBg=f56(opt,"b")
itemWnd.customCl=f56(opt,"c")
itemWnd.status=f56(opt,"s")
var h=f56(opt,"h")
if(h)itemWnd.style.fontWeight=h
var i=f56(opt,"i")
if(i)itemWnd.style.fontStyle=i}
if(!itemWnd.status&&itemWnd.url.indexOf("<root>")!=-1)itemWnd.status=itemWnd.url.replace("<root>","/")
return itemWnd.offsetHeight}
function f04(wnd,width,borderWidth){
wnd.style.width=(width-borderWidth)+"px"
if(wnd.offsetWidth>width-borderWidth)wnd.style.width=(width-parseInt(wnd.style.paddingLeft)-parseInt(wnd.style.paddingRight))+"px"}
function f56(txt,op){
if(!txt)return ""
var i=op?txt.indexOf(op+':'):-2
if(i !=-1){
var i2=txt.indexOf(";",i+2)
if(i2==-1)i2=txt.length
return txt.substring(i+2,i2)}
return ""}
function f05(q,v12,level,v04,nsi){
var ppName=v12+"pp"
var pp=zz(q.v18,ppName)
if(pp){
return pp}
var aid=f57(q)
if(aid&&aid==ppName)q.v17=null
var v09=q.attr
if(level>0)q.v02=q.v23
var oldv02=q.v02
pp=q.v18.document.createElement("DIV")
q.v18.document.body.appendChild(pp)
pp.id=ppName
pp.v04=v04
pp.level=level
pp.v05=v09[5]
pp.v06=v09[3]
var c1=v09[4]
var prop=eval("document."+v12+"prop")
if(prop){
var pw=f56(prop,"w")
if(pw)q.v02=parseInt(pw)
var bc=f56(prop,"p")
if(bc)c1=bc}
pp.v07=v09[7]
pp.v08=c1
pp.scrVis=false
with(pp.style){
zIndex=maxZ
position="absolute"
width=q.v02+"px"
if(!q.v11){
borderColor=q.borderCol
backgroundColor=c1
borderWidth=q.bord+"px"
borderStyle="solid"}
else backgroundColor=""
filter=getFilter(q)}
pp.q=q
f30(pp,"mouseout","f15",false)
f30(pp,"mouseover","f14",false)
var v31=0
if(q.v11){
var source=zz(0,q.name+'menubg4')
if(source){
var imel=q.v18.document.createElement("IMG")
pp.appendChild(imel)
imel.src=source.src
imel.id=pp.id+"openingImg"
imel.style.position="absolute"
imel.style.top="0px"
v31+=q.v10}}
var bgWnd=q.v18.document.createElement("DIV")
pp.appendChild(bgWnd)
bgWnd.id=pp.id+"bgWnd"
bgWnd.style.position="absolute"
bgWnd.style.top=q.v10+"px"
bgWnd.style.width=(q.v02-2*q.bord)+"px"
bgWnd.innerHTML="<font size='1'>&nbsp;</font>"
if(q.v11){
var source=zz(0,q.name+'menubg5')
if(source)bgWnd.style.backgroundImage="url("+source.src+")"}
if(q.v55)f03(q,pp,pp.id+"scrollUp","java script:scrollUp("+q.name+",'"+pp.id+"');","(^1)",null,v09,true,v31,bgWnd)
var array=eval(v12)
var v13
for(v13=0;v13<array.length/5;v13++){
var fold=array[v13*5+2]
var v30=fold?(v12+"_"+parseInt(v13+1)):null
var options=array[v13*5+4]
array[v13*5]=array[v13*5].replace('(imgdir)',f33(q.v21))
v31+=f03(q,pp,pp.id+"_"+v13,array[v13*5+1],array[v13*5],v30,v09,(v13==array.length/5-1),v31,bgWnd,array[v13*5+3],options)}
if(q.v55)f03(q,pp,pp.id+"scrollDown","java script:scrollDown("+q.name+",'"+pp.id+"');","(^2)",null,v09,true,v31,bgWnd)
var v28=0
if(q.v11){
var source=zz(0,q.name+'menubg6')
if(source){
var imel=q.v18.document.createElement("IMG")
pp.appendChild(imel)
imel.src=source.src
imel.id=pp.id+"closingImg"
imel.style.position="absolute"
imel.style.top=(v31)+"px"
v28=imel.offsetHeight
v31+=v28}}
pp.style.height=(v31+q.bord*2+v28)+"px"
pp.maxHeight=v31+q.bord*2
bgWnd.style.height=(v31-q.v10-v28)+"px"
if(pp.offsetHeight>v31+q.bord*2+v28){
pp.style.height=v31+"px"
q.bIncBorder=false
pp.maxHeight=v31}
q.v02=oldv02
return pp}
function f35(wnd,vis){
var i=1
while(true){
var eln='HideItem'
if(i>1)eln+=i
var hideWnd=zz(wnd,eln)
if(!hideWnd)break
hideWnd.style.visibility=vis ? 'visible' : 'hidden'
i++}}
function f06(q,ppId,dl){
if(ppId.indexOf('_')==-1){
f35(q.v18,1)
if(q.actm&&dl)chgBg(q,q.actm,0,1)}
if(q.v29){q.v29Str=null;clearTimeout(q.v29);}
var pp=zz(q.v18,ppId)
if(pp){
if(pp.v14)f06(q,pp.v14.id)
if(pp.v04){
var owner=zz(q.v18,pp.v04)
owner.v14=null}
if(IE4&&version>=6&&q.v11){
pp.style.clip="rect(0,-1,-1,0)"}
else{
pp.style.visibility="hidden"
pp.style.display="none"}}
var aid=f57(q)
if(aid&&aid==ppId)q.v17=null}
function f07(rect,refx,refy){
var retval=new rct(rect.left-refx,rect.top-refy,rect.right-refx,rect.bottom-refy)
return retval}
function f34(q,pp,actEl){
var items=pp.getElementsByTagName("DIV")
var i=0
for(;i<items.length;i++)if(actEl!=items[i]&&(!items[i].id||items[i].id.indexOf("scroll")==-1)){
items[i].style.backgroundColor=pp.q.v11?"transparent":(items[i].customBg?items[i].customBg:pp.v08)
items[i].style.color=items[i].customCl?items[i].customCl:pp.v06}}
function f08(q,pp,x,y,bDontMove,refWnd){
if(pp.id.indexOf('_')==-1){
f35(q.v18,0)}
var aid=f57(q)
if(aid&&aid==pp.id)return
pp.style.left=x+"px"
pp.style.top=y+"px"
if(IE4&&version>=6&&q.v11){
pp.style.clip="rect(auto,auto,auto,auto)"}
else{
pp.style.display=""
pp.style.visibility="visible"}
var v15=f19(q,pp)
var v16=f17(q.v18)
var bResize=(pp.offsetHeight<pp.maxHeight)
if(v15.right>v16.right){
if(refWnd&&refWnd.id&&refWnd.id.indexOf('tlm')==-1)pp.style.left=(Math.max(0,refWnd.offsetLeft-pp.offsetWidth+q.levelOffset))+"px"
else pp.style.left=(v16.right-pp.offsetWidth-5)+"px"}
var wnd1=zz(q.v18,pp.id+"scrollDown")
var wnd2=zz(q.v18,pp.id+"scrollUp")
var cv=mac?15:(q.bIncBorder?3:20)
if(((v15.bottom>v16.bottom)||bResize)&&!NS60){
var newtop=v16.bottom-pp.offsetHeight-cv
if(!q.menuHorizontal)bDontMove=false
if(q.v55&&(newtop<0||bDontMove||bResize)){
var minNum=Math.min(pp.maxHeight,v16.bottom-pp.offsetTop-cv-(q.bIncBorder?0:q.bord*2))
if(minNum>60){
pp.scrVis=(minNum!=pp.maxHeight)
f09(q,pp,v16.top,minNum)}
else if(newtop>0){
pp.style.top=newtop+"px"}
else{
pp.style.top="10px"
pp.scrVis=1
f09(q,pp,v16.top,v16.bottom-v16.top-30)}}
else
pp.style.top=newtop+"px"}
if(q.v55){
wnd1.style.display=pp.scrVis?"":"none"
wnd2.style.display=pp.scrVis?"":"none"}
f34(q,pp,null)}
function f09(q,pp,documentOffset,height){
var wnd2=zz(q.v18,pp.id+"scrollDown")
var wnd4=zz(q.v18,pp.id+"scrollUp")
var wnd3=zz(q.v18,pp.id+"bgWnd")
var wnd1Height=0
if(q.v11){
var wnd1=zz(q.v18,pp.id+"closingImg")
var wnd5=zz(q.v18,pp.id+"openingImg")
wnd1Height=wnd1.offsetHeight
wnd1.style.top=(height-wnd1Height)+"px"}
if(q.v55){
wnd2.style.zIndex=maxZ+1
wnd4.style.zIndex=maxZ+1}
pp.style.height=height+"px"
wnd3.style.height=(height-q.v10-q.bord*2-wnd1Height)+"px"
if(q.v55){
wnd2.style.top=(height-wnd1Height-q.scrollHeight-(q.bIncBorder?q.bord*2:0))+"px"
f10(q,pp.id,0)}}
function f10(q,ppId,dir){
var pp=zz(q.v18,ppId)
var v15=f19(q,pp)
var items=pp.getElementsByTagName("DIV")
var i=(dir>0?0:items.length-1)
var off=(dir>0?1:-1)
var bFirst=true
var offset=dir*q.scrollStep
if(pp.scrVis){
v15.top+=q.scrollHeight
v15.bottom-=q.scrollHeight}
v15.bottom-=2*q.bord
var wnd1Height=0
if(q.v11)wnd1Height=zz(q.v18,pp.id+"closingImg").offsetHeight
for(;i<items.length&&i>=0;i+=off){
var item=items[i]
if(!item.id||(item.id.indexOf("scroll")==-1&&item.id.indexOf("bgWnd")==-1)){
var itemRect=f19(q,item)
if(bFirst&&dir==0){offset=pp.maxHeight-(item.offsetTop+item.offsetHeight)+(pp.scrVis?q.scrollHeight:0)-(q.bIncBorder?q.bord*2:0)-wnd1Height;}
var relRect=f07(v15,itemRect.left,itemRect.top+offset)
if(dir>0&&relRect.top<-q.scrollHeight&&bFirst)return
if(dir<0&&itemRect.bottom<v15.bottom-wnd1Height&&bFirst)return
if(offset!=0)item.style.top=(item.offsetTop+offset)+"px"
if(!mac)item.style.clip="rect("+relRect.top+"px,"+relRect.right+"px,"+relRect.bottom+"px,"+relRect.left+"px)"
if(relRect.bottom<0||relRect.top>item.offsetHeight)
item.style.visibility="hidden"
else
item.style.visibility="visible"
bFirst=false}}
if(pp.scrPos)pp.scrPos+=offset
else pp.scrPos=offset}
function scrollUp(q,ppId){
f10(q,ppId,1)}
function scrollDown(q,ppId){
f10(q,ppId,-1)}
function f13(q,pp){
var wnd=q.v17
while(wnd){
if(wnd.id==pp.id)
return true
wnd=wnd.v14}
return false}
function f14(){
var q=this.q
if(q.v17&&q.v58&&f13(q,this))clearTimeout(q.v58)}
function f15(){
var q=this.q
f15Impl(q,this)}
function f15Impl(q,pp,pid){
if(!pp&&!pid)pp=q.v17
if(!pp)pp=zz(q.v18,pid+"pp")
if(pp&&q.mout&&q.v17&&f13(q,pp)){
if(q.v58)clearTimeout(q.v58)
q.v58=setTimeout("f06("+q.name+",'"+q.v17.id+"',1);",q.closeDelay)}}
function rct(left,top,right,bottom){
this.left=left
this.top=top
this.right=right
this.bottom=bottom}
function f17(doc){
var left=0
var top=0
var right
var bottom
if(doc.pageXOffset)left=doc.pageXOffset
else if(doc.document.documentElement.scrollLeft)left=doc.document.documentElement.scr
ollLeft
else if(doc.document.body.scrollLeft)left=doc.document.body.scrollLeft
if(doc.pageYOffset)top=doc.pageYOffset
else if(doc.document.documentElement.scrollTop)top=doc.document.documentElement.scrol
lTop
else if(doc.document.body.scrollTop)top=doc.document.body.scrollTop
if(doc.innerWidth)right=left+doc.innerWidth
else if(doc.document.documentElement.clientWidth)right=left+doc.document.documentElem
ent.clientWidth
else if(doc.document.body.clientWidth)right=left+doc.document.body.clientWidth
if(doc.innerHeight)bottom=top+doc.innerHeight
else if(doc.document.documentElement.clientHeight)bottom=top+doc.document.documentEle
ment.clientHeight
else if(doc.document.body.clientHeight)bottom=top+doc.document.body.clientHeight
var retval=new rct(left,top,right,bottom)
return retval}
function f18(q,wnd){
var doc=q ? q.v18.document : document
var left=mac?parseInt(doc.body.leftMargin):0
var top=mac?parseInt(doc.body.topMargin):0
var right=0
var bottom=0
var par=wnd
var topObj=doc.documentElement
if(!topObj)topObj=doc.body
while(par){
left=left+parseInt(par.offsetLeft)
top=top+parseInt(par.offsetTop)
if(par.offsetParent==par || par.offsetParent==topObj)break
par=par.offsetParent}
right=left+parseInt(wnd.offsetWidth)
bottom=top+parseInt(wnd.offsetHeight)
var retval=new rct(left,top,right,bottom)
return retval}
function f19(q,wnd){
if((mac||DOM||Opera7)&&wnd.getBoundingClientRect)return wnd.getBoundingClientRect()
return f18(q,wnd)}
function f53(wn,fr){
if(wn.frames){
if(wn.frames[fr])return wn.frames[fr]
for(var i=0;i<wn.frames.length;i++){
try{
if(wn.frames[i].name==fr)return wn.frames[i]
var ret=f53(wn.frames[i],fr)
if(ret)return ret
}catch(e){}}}
return null}
function f59(q,url,trgFrame){
if(trgFrame=="_self")
trgFrame=null
var mt=url.indexOf("mailto:")
if(mt!=-1)window.top.location=url.substring(mt)
else{
var find=url.indexOf("java script:")
if(find!=-1){
eval(url.substring(find))}
else{
if(trgFrame){
if(trgFrame=="_blank")window.open(url)
else if(trgFrame=="_top")window.top.location.href=url
else if(trgFrame=="_parent")parent.location.href=url
else{
var fr=f53(window.top,trgFrame)
if(fr)fr.location.href=url
else window.location.href=url}}
else{
q.targetFrame.location=url}}}}
function f20(){
var startPos=this.f54.indexOf('<!--')
if(startPos!=-1){
var endPos=this.f54.indexOf('-->',startPos)
alert("Full version of the product would now open item's URL in frame "+this.f54.substring(startPos+4,endPos))}
else{
var msg="Full version of the product would now open item's URL "
if(this.owner.q.cntFrame)msg+=" in frame "+this.owner.q.cntFrame;else msg+="in current window/frame."
alert(msg)}}
function f21(q){
if(q.v29Str){
eval(q.v29Str)
if(q.v29)clearTimeout(q.v29)
q.v29=setTimeout("f21("+q.name+")",q.v55)}}
function f22Impl(item){
var q=eval("window."+item.qId)
var ownerPopup=zz(q.v18,item.owner)
if(item.id&&item.id.indexOf("scroll")!=-1){
q.v29Str=item.url
var jsind=q.v29Str.indexOf('java script:')
if(jsind!=-1)q.v29Str=q.v29Str.substring(jsind)
f21(q)
return}
f34(q,ownerPopup,item)
if(q.bHlNL || item.url || item.v30){
item.style.color=ownerPopup.v05
item.style.backgroundColor=(!ownerPopup.v07&&q.v11)?"transparent":ownerPopup.v07}
if(!q.itemOverDelay){
f222(q,item)}
else{
if(q.v59)clearTimeout(q.v59)
q.itemOverObj=item
q.v59=setTimeout("f222 ("+q.name+",null)",q.itemOverDelay)}}
function f22(){
var item=this
f22Impl(item)}
function f222(q,itemObj){
var item=(itemObj ? itemObj : q.itemOverObj)
if(!item)return
var bOp=0
var ownerPopup=zz(q.v18,item.owner)
if(ownerPopup.v14){
if(item.v30&&item.v30+'pp'==ownerPopup.v14.id)bOp=1
if(!bOp)f06(q,ownerPopup.v14.id)}
if(item.status)
window.status=item.status
else if(item.url&&item.url.indexOf("java script:")==-1)
window.status=item.url
else
window.status=""
if(item.v30&&!bOp){
var rect=f19(q,item)
var x=rect.right-q.levelOffset
var y=rect.top
var pp=f05(q,item.v30,ownerPopup.level+1,item.owner)
ownerPopup.v14=pp
f08(q,pp,x+q.xSOff,y+q.ySOff,false,ownerPopup)}}
function f23(){
var item=this
var q=eval("window."+item.qId)
if(q.v29){q.v29Str=null;clearTimeout(q.v29);}
if(item.id&&item.id.indexOf("scroll")!=-1)return
window.status=""}
function exM(q,ppId,refWnd,dum,ml,mt,mr,mb){
if(!docLoaded)return
if(ppId=='none'){
var aid=f57(q)
if(!q.itemOverDelay&&aid)
f06(q,aid)
else
f15Impl(q)
if(q.v58)clearTimeout(q.v58)
return}
var bFr=q.v19&&!q.v20
var rect
if(refWnd=='coords'){
rect=f18(q,zz(0,q.name+'tl'))
rect.left=rect.left+ml
rect.top=rect.top+mt
rect.right=rect.left+mr
rect.bottom=rect.top+mb}
else{
rect=f18(q,zz(0,refWnd))
if(mac&&!q.menuHorizontal){
var ind=refWnd.indexOf('tlm')
if(ind !=-1)rect.top+=(rect.bottom-rect.top)*parseInt(refWnd.substr(ind+3))}}
if(q.bVarWidth&&!q.v11)q.v02=rect.right-rect.left+(IE4?q.bord*2:0)
var x
var y
x=rect.right
y=rect.top-q.bord
if(!q.itemOverDelay){
exM2(q,ppId,refWnd,x,y)}
else{
if(q.v59)clearTimeout(q.v59)
q.v59=setTimeout("exM2 ("+q.name+",'"+ppId+"','"+refWnd+"',"+x+","+y+")",q.itemOverDelay)}
if(dum){
if(dum.stopPropagation)dum.stopPropagation();else dum.cancelBubble=true}}
function f57(q){
if(typeof(q.v17)!='undefined'&&q.v17&&typeof(q.v17.id)!='unknown'&&typeof(q.v17.id)!='undefined')
return q.v17.id
return null}
function exM2(q,ppId,refWnd,x,y){
if(q.v58)clearTimeout(q.v58)
var aid=f57(q)
if(aid&&aid!=ppId+"pp")
f06(q,aid)
var pp=f05(q,ppId,0,null,refWnd)
f08(q,pp,x+q.xOff,y+q.yOff,true,null)
q.v17=pp}
function coM(q,ppId){
if(!docLoaded)return
if(q.v59&&q.itemOverDelay&&q.actm&&!q.v17)chgBg(q,q.actm,0,1)
clearTimeout(q.v59)
f15Impl(q)}
function f28(){
var nmn
for(nmn=1;nmn<=lastm;nmn++){
var q=eval("window.m"+nmn)
var aid=f57(q)
if(aid)f06(q,aid,1)}}
function f29(){
if(docLoaded)return
var nmn
for(nmn=1;nmn<=lastm;nmn++){
var q=eval("window.m"+nmn)
if(q){
q.v18=(q.v19&&!q.v20)?f53(window.top,q.v24):window
q.targetFrame=(q.v19)?f53(window.top,q.cntFrame):window
if(!q.mout)f30(q.v18.document,"click","f28",false)}}
docLoaded=true}
function f30(obj,event,fun,bubble){
if(obj.addEventListener)
obj.addEventListener(event,eval(fun),bubble)
else
eval("obj.on"+event+"="+fun)}
function chgBg(q,item,color,cl){
if(!IE4&&!DOM&&!Opera7)return
if(q.v52&&(color||cl)){
if(color){if(q.actm)chgBg(q,q.actm,0,1);q.actm=item;}
var it=zz(0,item)
var pit=zz(0,'pre'+(color?'1':'0')+item)
if(it&&pit)it.src=pit.src
var mnp=item.indexOf('tlm')
if(mnp!=-1){
var nn=parseInt(item.substr(mnp+3))+1
var lit=zz(0,'l'+item)
var rit=zz(0,'l'+q.name+'tlm'+nn)
var bnl=zz(0,q.name+'tlm'+nn)
var plit=zz(0,q.name+((nn==1)?(color?'_bh':'_b'):(color?'_slh':'_s')))
var prit=zz(0,q.name+((!bnl)?(color?'_eh':'_e'):(color?'_srh':'_s')))
if(lit&&rit&&plit&&prit){
lit.src=plit.src
rit.src=prit.src}}}}
function f31(){
var i
var l=document.lastLoadHandler
document.lastLoadHandler=-1
for(i=0;i<=l;i++){
var h=document.loadHandlers[i]
if(typeof(h)!='function'){
var bPar=(h.indexOf('(')==-1)
eval(h+(bPar ? '();' : ';'))}
else{
h()}}}
function f58(item){
var a=document.getElementById(item)
var m=item.indexOf('tlm')
if(m!=-1&&a){
var q=eval("window."+item.substr(0,m))
f59(q,a.href,a.target)}}


Can anyone help me figure out why my links are not working? I do have the .png files on my computer, but I was wondering if anyone could look at this and tell me why my links will not work.

{edit} Sorry for taking up so much space.. Rolling Eyes


Last edited by Guest on 09 Aug 2006 09:35:50 am; edited 1 time in total
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 09 Aug 2006 10:01:49 am    Post subject:

I can take a look at it if you provide an archived (zip, rar, what you want) file that contains the fully (mal)functioning site/pages.

ie, concerning a page that shows the malfunction:
all images
all javascript source files
all html
all server side scripting like php should there be any
Back to top
Noob88


Member


Joined: 23 Nov 2005
Posts: 239

Posted: 09 Aug 2006 10:26:02 am    Post subject:

Here is the zip file with all of the pictures and everything included. I need help figuring out why the links won't work.
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 09 Aug 2006 12:16:53 pm    Post subject:

Ok, here's the deal:

The menu's are generated in html elements by the javascript.

The target URL's are not anchors, so the click event must be tied to the element with javascript.

This is done in function "f30":

Quote:
function f30(obj,event,fun,bubble){
if(obj.addEventListener)
obj.addEventListener(event,eval(fun),bubble)


It is called to bind mouse clicks as such:

Quote:
f30(itemWnd,"click","f20",false)


So function f20 is called when you click on a menu item. I confirmed this with an alert("of course I\'m right").

Now, function f20 actually doesn't do anything with the click events, and you can guess why from looking at it's content:

Quote:
var startPos=this.f54.indexOf('<!--')
if(startPos!=-1){
var endPos=this.f54.indexOf('-->',startPos)
alert("Full version of the product would now open item's URL in frame "+this.f54.substring(startPos+4,endPos))}
else{
var msg="Full version of the product would now open item's URL "
if(this.owner.q.cntFrame)msg+=" in frame "+this.owner.q.cntFrame;else msg+="in current window/frame.";
alert(msg)}


The javascript code was generated by a demo/trail/test/nonfull/whatever version of Xtreeme DHTML Studio and the only thing that's broken is that the alert telling you this doesn't come up.

But, the function does respond, confirmed by an alert( "function f20 now responding to your click" ); placed in it's first line.

The problem with the function is twofold:

  • 1) as a try catch statement inserted by me showed, it produces a "TypeError" due to "this.owner.q has no properties "
  • 2) correcting that error wouldn't make the links work beyond showing the trial message of "Full version of the product would now open item's URL .."
This means one of the following can be done:

  • 1) you can get the full version that does work. see: http://www.xtreeme.com/dhtml/
    or
  • 2) I'll tell you what could make it work.
    or
  • 3) you use an entirely different menu solution.
I can help you with 3) and partially with 2) but I can't do 2) by giving you fully functioning code based on Xtreeme's work due to copyright reasons.


Last edited by Guest on 09 Aug 2006 12:27:27 pm; edited 1 time in total
Back to top
Noob88


Member


Joined: 23 Nov 2005
Posts: 239

Posted: 09 Aug 2006 01:06:51 pm    Post subject:

I like the way the menu looks and I would really like to make it work. If you are not willing to help me due that for whatever reason, I understand. If you can't help me make the one I have work, can you help me set one up with the same scheme; meaning using the same pictures and what not
Back to top
Arcane Wizard
`semi-hippie`


Super Elite (Last Title)


Joined: 02 Jun 2003
Posts: 8993

Posted: 09 Aug 2006 02:00:20 pm    Post subject:

If you can contact me on irc (aww on irc.unitedti.org or irc.efnet.org) I'll "see what I can do".

edit: I have it working, it was much simpler than I thought.


Last edited by Guest on 09 Aug 2006 02:19:33 pm; edited 1 time in total
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    »
» View previous topic :: View next topic  
Page 1 of 1 » All times are UTC - 5 Hours

 

Advertisement