Hi folks - I am mastering a website and there was some pre-existing Java content that I'd like to keep. The problem is that there is an error in the code somewhere and I am more of a networking guy than a programmer. Could one of you code-meisters please take a look at this and point out the error & proper code to resolve the problem?
Here is the script:
[HTML]<SCRIPT type=text/javascript>
var oArgs = GetArgs("?");
if (oArgs["return"] == 'ok') {
document.write( '<p style="color: red"><em>Your file has been successfully uploaded.</em></p>');
}
</SCRIPT>
</div>
</div>
</div>
</div>
</div>
</font></div>
</div>
</div>
<table cellSpacing="2" width="80%" border="0" id="table3">
<tr>
<td class="topics">
<div style="CLEAR: both; MARGIN-TOP: -3%; postition: relative">
<p class="MsoNorma l" style="line-height: 150%; margin-top: 0; margin-bottom: 0">
</p>
<div style="CLEAR: both; MARGIN-TOP: -3%; postition: relative">
<p class="MsoNorma l" style="line-height: 150%; margin-top: 0; margin-bottom: 0">
<font color="#CCFFCC" face="Verdana" size="2">
<br></font></p>
<p style="line-height: 150%; margin-top: 0; margin-bottom: 0">
<font color="#FFFFFF" ><span class="eFooter" >
<font face="Verdana"> <font size="3">Hall & Associates</font><br>560 Route 303, Suite 209<br>Orangebu rg, NY 10962</font></span></font></p>
<p class="MsoNorma l" style="line-height: 150%; margin-top: 0; margin-bottom: 0"> </div></div>
</td>
</tr>
</table>
</center></td>
</tr>
</table>
</td>
</tr>
</table>
</center>
</body>
</html>
[/HTML]
When I show the details of the error in Internet Explorer, it says:
Line: 176
Char: 3
Error: Object expected
Code: 0
This is the line in question:
var oArgs = GetArgs("?");
There is a second script at the top of the page:
[CODE=javascript]</style>
<script language="JavaS cript">
<!--
function FP_swapImg() {//v1.0
var doc=document,ar gs=arguments,el m,n; doc.$imgSwaps=n ew Array(); for(n=2; n<args.length;
n+=2) { elm=FP_getObjec tByID(args[n]); if(elm) { doc.$imgSwaps[doc.$imgSwaps.l ength]=elm;
elm.$src=elm.sr c; elm.src=args[n+1]; } }
}
function FP_preloadImgs( ) {//v1.0
var d=document,a=ar guments; if(!d.FP_imgs) d.FP_imgs=new Array();
for(var i=0; i<a.length; i++) { d.FP_imgs[i]=new Image; d.FP_imgs[i].src=a[i]; }
}
function FP_getObjectByI D(id,o) {//v1.0
var c,el,els,f,m,n; if(!o)o=documen t; if(o.getElement ById) el=o.getElement ById(id);
else if(o.layers) c=o.layers; else if(o.all) el=o.all[id]; if(el) return el;
if(o.id==id || o.name==id) return o; if(o.childNodes ) c=o.childNodes; if(c)
for(n=0; n<c.length; n++) { el=FP_getObject ByID(id,c[n]); if(el) return el; }
f=o.forms; if(f) for(n=0; n<f.length; n++) { els=f[n].elements;
for(m=0; m<els.length; m++){ el=FP_getObject ByID(id,els[n]); if(el) return el; } }
return null;
}
// -->
</script>[/CODE]
This seems to have the "Args" value in there somewhere but like I said, it's all greek to me! Any help would be very much appreciated - thank you to all you coders out there. = )
Brian
Here is the script:
[HTML]<SCRIPT type=text/javascript>
var oArgs = GetArgs("?");
if (oArgs["return"] == 'ok') {
document.write( '<p style="color: red"><em>Your file has been successfully uploaded.</em></p>');
}
</SCRIPT>
</div>
</div>
</div>
</div>
</div>
</font></div>
</div>
</div>
<table cellSpacing="2" width="80%" border="0" id="table3">
<tr>
<td class="topics">
<div style="CLEAR: both; MARGIN-TOP: -3%; postition: relative">
<p class="MsoNorma l" style="line-height: 150%; margin-top: 0; margin-bottom: 0">
</p>
<div style="CLEAR: both; MARGIN-TOP: -3%; postition: relative">
<p class="MsoNorma l" style="line-height: 150%; margin-top: 0; margin-bottom: 0">
<font color="#CCFFCC" face="Verdana" size="2">
<br></font></p>
<p style="line-height: 150%; margin-top: 0; margin-bottom: 0">
<font color="#FFFFFF" ><span class="eFooter" >
<font face="Verdana"> <font size="3">Hall & Associates</font><br>560 Route 303, Suite 209<br>Orangebu rg, NY 10962</font></span></font></p>
<p class="MsoNorma l" style="line-height: 150%; margin-top: 0; margin-bottom: 0"> </div></div>
</td>
</tr>
</table>
</center></td>
</tr>
</table>
</td>
</tr>
</table>
</center>
</body>
</html>
[/HTML]
When I show the details of the error in Internet Explorer, it says:
Line: 176
Char: 3
Error: Object expected
Code: 0
This is the line in question:
var oArgs = GetArgs("?");
There is a second script at the top of the page:
[CODE=javascript]</style>
<script language="JavaS cript">
<!--
function FP_swapImg() {//v1.0
var doc=document,ar gs=arguments,el m,n; doc.$imgSwaps=n ew Array(); for(n=2; n<args.length;
n+=2) { elm=FP_getObjec tByID(args[n]); if(elm) { doc.$imgSwaps[doc.$imgSwaps.l ength]=elm;
elm.$src=elm.sr c; elm.src=args[n+1]; } }
}
function FP_preloadImgs( ) {//v1.0
var d=document,a=ar guments; if(!d.FP_imgs) d.FP_imgs=new Array();
for(var i=0; i<a.length; i++) { d.FP_imgs[i]=new Image; d.FP_imgs[i].src=a[i]; }
}
function FP_getObjectByI D(id,o) {//v1.0
var c,el,els,f,m,n; if(!o)o=documen t; if(o.getElement ById) el=o.getElement ById(id);
else if(o.layers) c=o.layers; else if(o.all) el=o.all[id]; if(el) return el;
if(o.id==id || o.name==id) return o; if(o.childNodes ) c=o.childNodes; if(c)
for(n=0; n<c.length; n++) { el=FP_getObject ByID(id,c[n]); if(el) return el; }
f=o.forms; if(f) for(n=0; n<f.length; n++) { els=f[n].elements;
for(m=0; m<els.length; m++){ el=FP_getObject ByID(id,els[n]); if(el) return el; } }
return null;
}
// -->
</script>[/CODE]
This seems to have the "Args" value in there somewhere but like I said, it's all greek to me! Any help would be very much appreciated - thank you to all you coders out there. = )
Brian
Comment