...

View Full Version : some problem with older javascript here



erivy
04-10-2005, 03:48 PM
Hi,

I am trying to install a script and my server can't recognize this code:

<SCRIPT language=JavaScript1.2>
function high(which2){
theobject=which2
highlighting=setInterval("highlightit(theobject)",80)
}

function low(which2)
{
clearInterval(highlighting)
which2.filters.alpha.opacity=60
}

function highlightit(cur2)
{
if(cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=10
else if(window.highlighting)
clearInterval(highlighting)
}
</SCRIPT>


my question is whether is this an older version of javascript? if so, how do I replace this? thanks in advanced!

joh6nn
04-10-2005, 05:27 PM
could you provide some more information, please? preferably a link to the page this is on? you haven't really given us enough to go on.

erivy
04-11-2005, 07:05 AM
hi joh6nn,

thanks for your reply. here is the link:

http://www.cshosts.info/cgi-bin/manager.cgi

enter whatever username and password and it will open to a blank page.

many thanks for your help!

Regards

_Aerospace_Eng_
04-11-2005, 07:34 AM
you have an extra body tag, and html tag

<HTML><HEAD><TITLE>yoursite.com</TITLE>


<META content=All name=robots>
<META content="7 days" name=revisit>
<META content=NOARCHIVE name=ROBOTS>
<STYLE type=text/css>A:link {
TEXT-DECORATION: none
}
A:visited {
TEXT-DECORATION: none
}
.button {
BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BACKGROUND: #ccccff; BORDER-LEFT: #000000 1px solid; CURSOR: hand; COLOR: #000000; BORDER-BOTTOM: #000000 1px solid
}
</STYLE>



<SCRIPT language=JavaScript1.2>
function high(which2){
theobject=which2
highlighting=setInterval("highlightit(theobject)",80)
}

function low(which2)
{
clearInterval(highlighting)
which2.filters.alpha.opacity=60
}

function highlightit(cur2)
{
if(cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=10
else if(window.highlighting)
clearInterval(highlighting)
}
</SCRIPT>

<META content="MSHTML 6.00.2600.0" name=GENERATOR></HEAD>
<BODY vLink=#6666FF aLink=#000066 link=#00FFFF bgColor=#000000 leftMargin=0
topMargin=0 MARGINHEIGHT="0" MARGINWIDTH="0" text="#CCCCFF">
<TABLE cellPadding=0 width=650 align=center bgColor=#000000 border=0
valign="top">
<TBODY>
<TR>
<TD>
<TABLE cellPadding=0 width=650 bgColor=#eeeeee border=0>
<TBODY>
<TR>
<TD vAlign=top align=middle bgColor=#00A8EC colSpan=2 height=80><a href="http://www.yoursite.com"><img src="http://www.yoursite.com/logo.jpg" width="650" height="140" border="0"></a><BR>
</TD>

</TR>
</TBODY>
</TABLE>

</TD>
</TR></TBODY></TABLE>
<html>
<head>
<title>yoursite.com</title>
</head>
<body bgcolor="#FFFFFF" link="#000000" vlink="#FF0000" alink="#800080">
<form method="POST">
<div align="center"><center><table border="0" cellpadding="0" cellspacing="0" bgcolor="#000000">

<tr>
<td><table border="0" cellpadding="2" cellspacing="1" width="600">
<tr>
<td>
<div align="center"><font face="Arial" color="#FFFFFF"><strong><b><u>Hosting
Login</u></b></strong></font></div>
</td>
</tr>
<tr>
<td bgcolor="#000000">
<div align="center">
<table border="0" cellpadding="0" cellspacing="0">

<tr>
<td width="150"><div align="right">
<p><font face="Arial" size="2"><b><font color="#FFFFFF">Username</font></b></font>
</td>
<td>
<input type="text" name="username" size="20" style="BACKGROUND-COLOR: rgb(165,180,196); BORDER-BOTTOM: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; FONT-SIZE: 10px">
</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0">

<tr>
<td width="150"><div align="right">
<p><font face="Arial"><b><font size="2" color="#FFFFFF">Password</font></b></font>
</td>
<td>
<input type="password" name="password" size="20" style="BACKGROUND-COLOR: rgb(165,180,196); BORDER-BOTTOM: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; FONT-SIZE: 10px">
</td>
</tr>
</table>
<font color="#000000">mmmmmmm.</font>
<input type="submit" value="Login" style="BACKGROUND-COLOR: rgb(210,210,210); BORDER-BOTTOM: black 1px solid; BORDER-LEFT: black 1px solid; BORDER-RIGHT: black 1px solid; BORDER-TOP: black 1px solid; FONT-SIZE: 13px">

</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</center></div>
</form>
<p align="center">&nbsp;</p>

</body>
</html></BODY>
</HTML>
and your code will only work for Internet Explorer, and some browsers, dont like the language="javascript" try changing it to type="text/javscript" for as the language attribute of the script tag is deprecate, and also fix your extra tags and see if that solves things.

erivy
04-11-2005, 09:27 AM
thanks _Aerospace_Eng_, i try to delete all the body and head, only leave one at the top, but still, it is not working, may i know what's wrong with that?

thanks alot!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum