ambercakes
07-23-2009, 04:58 AM
I am not an expert scripter or anything, so please explain to me like a very new newbie. Thanks.
Hello smart scripters! I am having an error with 2 scripts. I tried them by themselves on the page and they work fine on there own, but when you put them together they do not. I am putting a vbscript with a form javascript. So, if I put the vbscript by itself it works, I take vbscript out the javascript works. If I put both, only the vbscript works and when I try to preview it in IE I can pull the drop down box but it will not go to the link specified at all. I also get an error saying:
Object Required: 'this'
Line 173
Char 1
But the only thing I see on that Line is this:
<TD vAlign=bottom>
Please make these scripts friends, LOL. Thanks in Advance!
Here is the 1st code: (I put this one in the head section)
<SCRIPT language=VBscript>
'-----------------------------------
'Script writer unknown
'-----------------------------------
Dim scw,sch,th,ppic1w,ppic1h,cch1,ccw1,A1,R1,th1,ppic2w,ppic2h,cch2,ccw2,A2,R2,th2
Sub Window_OnLoad()
scw=document.body.clientWidth
sch=document.body.clientHeight
pich=95
picw=90
cch1=190
ccw1=scw/2+140
cch2=160
ccw2=scw/2+150
A1=6.28
R1=140
A2=6.28
R2=140
th1=SetTimeOut("circle1", 30)
th2=SetTimeOut("circle2", 30)
ClearInterval(th)
th=SetInterval("scroll", 64)
End sub
Sub circle1()
ClearTimeOut(th1)
A1=A1-0.03
ppic1h=R1*sin(A1)+cch1
ppic1w=2*R1*cos(A1)+ccw1
pic1.style.Top=ppic1h
pic1.style.Left=ppic1w
th1=SetTimeOut ("circle1",40)
End sub
Sub circle2()
ClearTimeOut(th2)
A2=A2-0.02
ppic2h=R2*sin(A2)+cch2
ppic2w=2*R2*cos(A2)+ccw2-50
pic2.style.Top=ppic2h
pic2.style.Left=ppic2w
th2=SetTimeOut ("circle2",55)
End sub
Sub Scroll()
End Sub
</SCRIPT>
Here is the 2nd one, it's javascript: (Has 2 parts)
This one goes in the head section:
<script type="text/javascript">
<!--
function change(url){
if(url=="none"){
return false;
}
else {
window.location=url;
}
}
//-->
</script>
And this one goes in the body section:
<div align="center">
<select style="BORDER-BOTTOM: outset; FONT-FAMILY: comic sans ms; BACKGROUND: #3499a7; COLOR: #000000; FONT-SIZE: 14px; BORDER-TOP: outset;
BORDER-RIGHT: outset; BORDER-LEFT: outset" onChange="change(this.value)" name="Ambercakes">
<option value="none">Letter ŠAmbercakes</option>
<option value="http://www.ambercakes.com">My Site</option>
<option value="none">For Incredimail Use Only</option>
</select></div>
Hello smart scripters! I am having an error with 2 scripts. I tried them by themselves on the page and they work fine on there own, but when you put them together they do not. I am putting a vbscript with a form javascript. So, if I put the vbscript by itself it works, I take vbscript out the javascript works. If I put both, only the vbscript works and when I try to preview it in IE I can pull the drop down box but it will not go to the link specified at all. I also get an error saying:
Object Required: 'this'
Line 173
Char 1
But the only thing I see on that Line is this:
<TD vAlign=bottom>
Please make these scripts friends, LOL. Thanks in Advance!
Here is the 1st code: (I put this one in the head section)
<SCRIPT language=VBscript>
'-----------------------------------
'Script writer unknown
'-----------------------------------
Dim scw,sch,th,ppic1w,ppic1h,cch1,ccw1,A1,R1,th1,ppic2w,ppic2h,cch2,ccw2,A2,R2,th2
Sub Window_OnLoad()
scw=document.body.clientWidth
sch=document.body.clientHeight
pich=95
picw=90
cch1=190
ccw1=scw/2+140
cch2=160
ccw2=scw/2+150
A1=6.28
R1=140
A2=6.28
R2=140
th1=SetTimeOut("circle1", 30)
th2=SetTimeOut("circle2", 30)
ClearInterval(th)
th=SetInterval("scroll", 64)
End sub
Sub circle1()
ClearTimeOut(th1)
A1=A1-0.03
ppic1h=R1*sin(A1)+cch1
ppic1w=2*R1*cos(A1)+ccw1
pic1.style.Top=ppic1h
pic1.style.Left=ppic1w
th1=SetTimeOut ("circle1",40)
End sub
Sub circle2()
ClearTimeOut(th2)
A2=A2-0.02
ppic2h=R2*sin(A2)+cch2
ppic2w=2*R2*cos(A2)+ccw2-50
pic2.style.Top=ppic2h
pic2.style.Left=ppic2w
th2=SetTimeOut ("circle2",55)
End sub
Sub Scroll()
End Sub
</SCRIPT>
Here is the 2nd one, it's javascript: (Has 2 parts)
This one goes in the head section:
<script type="text/javascript">
<!--
function change(url){
if(url=="none"){
return false;
}
else {
window.location=url;
}
}
//-->
</script>
And this one goes in the body section:
<div align="center">
<select style="BORDER-BOTTOM: outset; FONT-FAMILY: comic sans ms; BACKGROUND: #3499a7; COLOR: #000000; FONT-SIZE: 14px; BORDER-TOP: outset;
BORDER-RIGHT: outset; BORDER-LEFT: outset" onChange="change(this.value)" name="Ambercakes">
<option value="none">Letter ŠAmbercakes</option>
<option value="http://www.ambercakes.com">My Site</option>
<option value="none">For Incredimail Use Only</option>
</select></div>