By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,918 Members | 1,852 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,918 IT Pros & Developers. It's quick & easy.

Object Expected Error

P: 1
I'm receiving an "Object Expected" Error (Line:309, Char:0). I'm
confused as to what is happening.Also, I can't run this code using other browser such as Fire Fox. Thispage only can view using IE. Is there something that I'm missing? The error is
pointing to
<textarea name="tairbillno" cols="25" rows="4" wrap="HARD" id="tairbillno" ONKEYDOWN="return checkMaxRow(this, 10)"></textarea>

Here is my code below:

<HTML>
<HEAD>
<TITLE>ABX EXPRESS (M) SDN BHD</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<style type="text/css">

#popitmenu{
position: absolute;
background-color: white;
border:1px solid black;
font: normal 12px Verdana;
line-height: 18px;
z-index: 100;
visibility: hidden;
}

#popitmenu a{
text-decoration: none;
padding-left: 6px;
color: black;
display: block;
}

#popitmenu a:hover{ /*hover background color*/
background-color: #FF0000;
}

/*start menu***************************************/

#dd {
margin-left: 1%;
padding: 0 0 20px 0;
}

#dd li {
margin: 0;
padding: 0;
list-style: none;
float: left;
font: bold 11px arial;
}

#dd li a.menu {
display: block;
text-align: center;
padding: 4px 10px;
margin: 0 1px 0 0;
color: #FFF;
width: 60px;
text-decoration: none;
background-color: #909090;
}

#dd li a.menu:hover {
background-color: #404040;
}

.submenu {
background: #EAEBD8;
border: 1px solid #5970B2;
visibility: hidden;
position: absolute;
z-index: 3;
}

.submenu a {
display: block;
font: 11px arial;
text-align: left;
text-decoration: none;
padding: 5px;
color: #404040;
}

.submenu a:hover {
color: #FFF;
background-color: #404040;
}


.style10 {
font-size: 18px;
font-weight: bold;
color: #950205;
}
.style11 {
color: #FFFFFF;
font-size: 14px;
font-weight: bold;
}
.style18 {font-size: 12px; font-weight: bold; }
.style16 {color: #FF0000}
.style17 {color: #000000}
.style7 {font-size: 10px}
.style9 {font-family: Verdana}

.style19 {
font-weight: bold;
text-align: center;
}

</style>

<script type="text/javascript" src="simpleDropDownMenu.js"></script>

<script type="text/javascript">

// JK Pop up image viewer script- By JavaScriptKit.com
// Visit JavaScript Kit (http://javascriptkit.com)
// for free JavaScript tutorials and scripts
// This notice must stay intact for use

var popbackground="white" //specify backcolor or background image for pop window
var windowtitle="ABX EXPRESS(M) SDN BHD" //pop window title

function detectexist(obj){
return (typeof obj !="undefined")
}

function jkpopimage(imgpath, popwidth, popheight, textdescription){

function getpos(){
leftpos=(detectexist(window.screenLeft))? screenLeft+document.body.clientWidth/2-popwidth/2 : detectexist(window.screenX)? screenX+innerWidth/2-popwidth/2 : 0
toppos=(detectexist(window.screenTop))? screenTop+document.body.clientHeight/2-popheight/2 : detectexist(window.screenY)? screenY+innerHeight/2-popheight/2 : 0
if (window.opera){
leftpos-=screenLeft
toppos-=screenTop
}
}

getpos()
var winattributes='width='+popwidth+',height='+popheig ht+',resizable=yes,left='+leftpos+',top='+toppos
var bodyattribute=(popbackground.indexOf(".")!=-1)? 'background="'+popbackground+'"' : 'bgcolor="'+popbackground+'"'
if (typeof jkpopwin=="undefined" || jkpopwin.closed)
jkpopwin=window.open("","",winattributes)
else{
getpos() //uncomment these 2 lines if you wish subsequent popups to be centered too
jkpopwin.moveTo(leftpos, toppos)
jkpopwin.resizeTo(popwidth, popheight+30)
}
jkpopwin.document.open()
jkpopwin.document.write('<html><title>'+windowtitl e+'</title><body '+bodyattribute+'><img src="'+imgpath+'" style="margin-bottom: 0.5em" ><br>'+textdescription+'</body></html>')
jkpopwin.document.close()
jkpopwin.focus()
}

</script>




</HEAD>
<link href="css/styles.css" rel="stylesheet" type="text/css">
<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 ><center>

<!-- ImageReady Slices (index.psd) -->
<table width=800 border=0 cellpadding=0 cellspacing=0 class="frame">
<tr bgcolor="#950205">
<td colspan=4 rowspan=3 valign="top" bgcolor="#FFFFFF"><img src="images/main.gif" alt="" width=230 height=117 border="0" usemap="#Map2"></td>
<td colspan=4 bgcolor="#950205"><img name="company" src="images/company.gif" width=114 height=57 border=0 ></td>
<td colspan=2><img name="products" src="images/products.gif" width=106 height=57 border=0 ></td>
<td colspan=2><img name="services" src="images/services.gif" width=99 height=57 border=0 ></td>
<td colspan=2><img name="partners" src="images/partners.gif" width=95 height=57 border=0 ></td>
<td><img src="images/contact-us.gif" name="contact_us" width=109 height=57 border=0 usemap="#contact_usMap" ></td>
<td colspan=3><img src="images/menu.gif" width=43 height=57 alt=""></td>
<td><img src="images/spacer.gif" width=1 height=57 alt=""></td>
</tr>
<tr>
<td colspan=14 valign="bottom"><hr></td>
<td><img src="images/spacer.gif" width=1 height=28 alt=""></td>
</tr>
<tr>
<td colspan=14>

<ul id="dd">
<li><a href="#" class="menu" id="mmenu1"
onmouseover="mopen(1);"
onmouseout="mclosetime();">About.ABX </a>
<div class="submenu" id="menu1"
onmouseover="mcancelclosetime()"
onmouseout="mclosetime();">
<a href="aboutabx.html">Corporate History</a>
<a href="profile.html">Management Profile</a>
<a href="mission.html">Mission/Vission</a>
<a href="objective.html">Objective</a>
<a href="nature.html">Nature of Business</a> </div>
</li>
<li><a href="#" class="menu" id="mmenu2"
onmouseover="mopen(2);"
onmouseout="mclosetime();">Track/Trace</a>
<div class="submenu" id="menu2"
onmouseover="mcancelclosetime()"
onmouseout="mclosetime();">
<a href="tracking.html">Local</a>
<a href="http://www.gdalliance.com" target="_blank">International</a> </div>
</li>
<li><a href="product.html" class="menu">Product/Services</a></li> <li><a href="network.html" class="menu">Offices</a></li>
<li><a href="#" class="menu" id="mmenu3"
onmouseover="mopen(3);"
onmouseout="mclosetime();">Tools</a>
<div class="submenu" id="menu3"
onmouseover="mcancelclosetime()"
onmouseout="mclosetime();">
<a href="volume.html">Volumetric Weight</a> </div>
</li>
<li><a href="#" class="menu" id="mmenu4"
onmouseover="mopen(4);"
onmouseout="mclosetime();">Contact</a>
<div class="submenu" id="menu4"
onmouseover="mcancelclosetime()"
onmouseout="mclosetime();">
<a href="contact.html">Branches/Station</a>
<a href="comment.asp">Support</a>
<a href="feedback.asp">Customer Feedback</a> </div>
</li>
<li><a href="#" class="menu" id="mmenu5"
onmouseover="mopen(5);"
onmouseout="mclosetime();">Intranet</a>
<div class="submenu" id="menu5"
onmouseover="mcancelclosetime()"
onmouseout="mclosetime();">
<a href="http://abxexpress.com.my:8383" target="_blank">Web Mail</a>
<a href="webservices/login.asp">Web Services</a> </div>
</li>
</ul></td>
<td><img src="images/spacer.gif" width=1 height=24 alt=""></td>
</tr>
<tr>
<td colspan=18 valign="top"><div align="center"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="3%"><img src="images/part4.gif" width="23" height="250"></td>
<td width="26%"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td bgcolor="#CCCCCC" class="style10">Company Profile </td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td bgcolor="#950205"><div align="center"><span class="style11">
MISSION</span></div></td>
</tr>
<tr>
<td><span class="style18">To Invest In Our People To Deliver Beyond
Satisfaction<br>
To Our Customer, Stakeholders &amp;Themselves</span></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td bgcolor="#950205" class="style11"><div align="center">VISION</div></td>
</tr>
<tr>
<td class="style18">To be the <span class="style16">BEST</span> by
Ensuring that <span class="style17">THE CUSTOMER</span> is at the
Centre of<br>
EVERYTHING WE DO </td>
</tr>
</table></td>
<td width="43%"><div align="center"><img src="images/wel-23.gif" width="333" height="220" align="left"></div></td>
<td width="28%"><div align="center">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="3" bgcolor="#CCCCCC"><div align="center" class="style10">
company highlights </div></td>
</tr>
<tr>
<td width="11%" bgcolor="#CCCCCC" style="height: 174px"></td>
<td width="79%" style="height: 174px"><p>
29-11-2007<br>
Opening Of Cheras Branch <br>

<br><a href="#" onClick="jkpopimage('images/news/E50-NST.jpg', 800, 540, 'ABX Takes Surging Demand in Stride.'); return false"> 23-11-2007</a><br>
ABX Takes Surging In Demand <br>
<br><a href="#" onClick="jkpopimage('images/news/utusan24sept07.jpg', 800, 400, 'Pengalaman Kunci Kejayaan ABX Express.'); return false">24-09-2007</a>
<br>
Pengalaman Kunci Kejayaan ABX <br>
<br><a href="#" onClick="jkpopimage('images/news/Hmetro.jpg', 700, 800, 'ABX Express sasar perolehan RM45 juta, Harian Metro.'); return false">05-01-2007</a>
<br>
ABX Sasar Perolehan Perolehan RM45 Juta<br>
<br>
<a href="news.html">more...</a></p>
</td>
<td width="10%" bgcolor="#CCCCCC" style="height: 174px"></td>
</tr>
<tr>
<td colspan="3" bgcolor="#CCCCCC"><br>
<br></td>
</tr>
</table>
</div></td>
</tr>
<tr>
<td valign="top"><img src="images/part4.gif" width="23" height="209"><br>
<img src="images/part4.gif" width="23" height="209"></td>
<td valign="top">
<table style="width: 100%" cellpadding="0">
<tr>
<td class="style10" bgcolor="#C0C0C0">Track &amp; Trace</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td><form action="WebServices/smarttrackcust2.asp?vsearch=True" method="post" name="FormName" id="FormName" >
<p> <font size="1" face="Verdana, Arial, Helvetica, sans-serif">

<textarea name="tairbillno" cols="25" rows="4" wrap="HARD" id="tairbillno" ONKEYDOWN="return checkMaxRow(this, 10)"></textarea>
<br>
<input name="btnSubmit" type="button" id="btnSubmit" value="Track">
<script for="btnSubmit" event="onClick" language="VBScript">
<!--
if trim(FormName.tairbillno.value) = "" then
msgbox"Please input airbillno",48
else
FormName.submit
end if

// -->
</script>
<br>
</font><font size="1"><span class="style9">*Maximum 10 rows of
consignment note numbers.<br>
*Press <strong>Enter</strong> button to key-in new number</span></font></p>
</form></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td bgcolor="#C0C0C0"><form name="form2" method="post" action="mailto:fini@abxexpress.com.my?subject=Surv ey Response">
How do you rate our new website?<br>
<p>
<label>
<input type="radio" name="websurvey" value="Excellent" checked>
Excellent</label>
<br>
<label>
<input type="radio" name="websurvey" value="Good">
Good</label>
<br>
<label>
<input type="radio" name="websurvey" value="Moderate">
Moderate</label>
<br>
<label>
<input type="radio" name="websurvey" value="Bad">
Bad</label>
<br>
<label>
<input type="radio" name="websurvey" value="NoComment">
No comment</label>
</p>
<p align="center">
<input name="Submitweb" type="submit" id="Submitweb" value="Poll Now">
</p>
</form></td>
</tr>
</table>
</td>
<td colspan="2" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td><img src="images/ab1-2.gif" width="565" height="26"></td>
</tr>
<tr>
<td>
<table style="width: 100%" cellpadding="0" border="0">
<tr>
<td style="width: 110px">
<img src="images/ab2.gif" width="119" height="86"></td>
<td valign="top"><strong>ABX</strong> has an excellent
commitment to customer services, anticipating needs and
providing the highest level of services. Customers have
options including scheduling of documents and packages
pickups, tracking of shipments, checking freight charges and
obtaining information about <strong>ABX</strong> services.</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td><img src="images/prod1-1.gif" width="565" height="26"></td>
</tr>
<tr>
<td>
<table style="width: 100%" cellpadding="0">
<tr>
<td style="width: 119px">
<img src="images/prod2.gif" width="120" height="87"></td>
<td valign="top"><span class="style7"><strong>ABX</strong>
offers to customers the perfect solution to all domestic and
international delivery needs which require speed and proof
of delivery. Whether it's a letter, a parcel or cards and
bulk distribution, customers can trust us to handle all
shipments from pick-up to door-to-door delivery. </span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td><img src="images/prod41.gif" width="565" height="26"></td>
</tr>
<tr>
<td>
<table style="width: 100%" cellpadding="0">
<tr>
<td style="width: 120px">
<img src="images/ab4.gif" width="119" height="86"></td>
<td valign="top"><span class="style7"><strong>ABX</strong>
provides a worldwide network for all of your airfreight
needs, with time-defined and guaranteed services supported
by preferred carriers. A core element of our freight
management service offering is the ability to move single or
complex shipments by air, at any time and to any
destination.<BR>
</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="style19">HOTLINE: 03-7711 6688</td>
</tr>
<tr>
<td class="style19">GENERAL LINE: 03-7711 6633</td>
</tr>
<tr>
<td class="style19">FAX: 03-7711 6699</td>
</tr>
</table></td>
</tr>
</table>
</div>
</td>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan=18><hr></td>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan=18 bgcolor="#FFFFFF"><div align="center">
<script language="JavaScript1.2">

/*
Cross browser Marquee script- Dynamic Drive (www.dynamicdrive.com)
For full source code, 100's more DHTML scripts, and Terms Of Use, visit http://www.dynamicdrive.com
Credit MUST stay intact
*/

//Specify the marquee's width (in pixels)
var marqueewidth="600px"
//Specify the marquee's height
var marqueeheight="25px"
//Specify the marquee's marquee speed (larger is faster 1-10)
var marqueespeed=4
//configure background color:
var marqueebgcolor="#FFFFFF"
//Pause marquee onMousever (0=no. 1=yes)?
var pauseit=1

//Specify the marquee's content (don't delete <nobr> tag)
//Keep all content on ONE line, and backslash any single quotations (ie: that\'s great):

var marqueecontent='<nobr><font size="2" face="Verdana">Welcome to <strong>ABX EXPRESS (M) SDN BHD </strong> Official Website...</font></nobr>'


////NO NEED TO EDIT BELOW THIS LINE////////////
marqueespeed=(document.all)? marqueespeed : Math.max(1, marqueespeed-1) //slow speed down by 1 for NS
var copyspeed=marqueespeed
var pausespeed=(pauseit==0)? copyspeed: 0
var iedom=document.all||document.getElementById
if (iedom)
document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-9000px">'+marqueecontent+'</span>')
var actualwidth=''
var cross_marquee, ns_marquee

function populate(){
if (iedom){
cross_marquee=document.getElementById? document.getElementById("iemarquee") : document.all.iemarquee
cross_marquee.style.left=parseInt(marqueewidth)+8+ "px"
cross_marquee.innerHTML=marqueecontent
actualwidth=document.all? temp.offsetWidth : document.getElementById("temp").offsetWidth
}
else if (document.layers){
ns_marquee=document.ns_marquee.document.ns_marquee 2
ns_marquee.left=parseInt(marqueewidth)+8
ns_marquee.document.write(marqueecontent)
ns_marquee.document.close()
actualwidth=ns_marquee.document.width
}
lefttime=setInterval("scrollmarquee()",20)
}
window.onload=populate

function scrollmarquee(){
if (iedom){
if (parseInt(cross_marquee.style.left)>(actualwidth*(-1)+8))
cross_marquee.style.left=parseInt(cross_marquee.st yle.left)-copyspeed+"px"
else
cross_marquee.style.left=parseInt(marqueewidth)+8+ "px"

}
else if (document.layers){
if (ns_marquee.left>(actualwidth*(-1)+8))
ns_marquee.left-=copyspeed
else
ns_marquee.left=parseInt(marqueewidth)+8
}
}

if (iedom||document.layers){
with (document){
document.write('<table border="0" cellspacing="0" cellpadding="0"><td>')
if (iedom){
write('<div style="position:relative;width:'+marqueewidth+';he ight:'+marqueeheight+';overflow:hidden">')
write('<div style="position:absolute;width:'+marqueewidth+';he ight:'+marqueeheight+';background-color:'+marqueebgcolor+'" onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed">')
write('<div id="iemarquee" style="position:absolute;left:0px;top:0px"></div>')
write('</div></div>')
}
else if (document.layers){
write('<ilayer width='+marqueewidth+' height='+marqueeheight+' name="ns_marquee" bgColor='+marqueebgcolor+'>')
write('<layer name="ns_marquee2" left=0 top=0 onMouseover="copyspeed=pausespeed" onMouseout="copyspeed=marqueespeed"></layer>')
write('</ilayer>')
}
document.write('</td></table>')
}
}
</script>
</div></td>
<td><img src="images/spacer.gif" width=1 height=22 alt=""></td>
</tr>
<tr>
<td colspan=6 align="center" valign="middle" class="text2"> Copyright &copy;
ABX EXPRESS (M) SDN BHD <br>
Designed by <a href="mailto:webmaster@abxexpress.com.my" target="_blank">webmaster</a>
<td colspan=12 align="center" valign="middle" class="text4"><a href="index.html">Home</a> | <a href="aboutabx.html">Company</a> | <a href="achievement.html">Achievements</a> | <a href="majorcust.html">Customers </a> | <a href="career.html">Career</a> | <a href="info.html">Info</a> | <a href="news.html">News</a> | <a href="contact.html">Contact Us</a></td>
<td><img src="images/spacer.gif" width=1 height=47 alt=""></td>
</tr>
<tr>
<td><img src="images/spacer.gif" width=22 height=1 alt=""></td>
<td><img src="images/spacer.gif" width=20 height=1 alt=""></td>
<td><img src="images/spacer.gif" width=166 height=1 alt=""></td>
<td><img src="images/spacer.gif" width=17 height=1 alt=""></td>
<td><img src="images/spacer.gif" width=8 height=1 alt=""></td>
<td><img src="images/spacer.gif" width=40 height=1 alt=""></td>
<td><img src="images/spacer.gif" width=52 height=1 alt=""></td>
<td><img src="images/spacer.gif" width=13 height=1 alt=""></td>
<td><img src="images/spacer.gif" width=6 height=1 alt=""></td>
<td><img src="images/spacer.gif" width=94 height=1 alt=""></td>
<td><img src="images/spacer.gif" width=13 height=1 alt=""></td>
<td><img src="images/spacer.gif" width=83 height=1 alt=""></td>
<td><img src="images/spacer.gif" width=44 height=1 alt=""></td>
<td><img src="images/spacer.gif" width=50 height=1 alt=""></td>
<td><img src="images/spacer.gif" width=105 height=1 alt=""></td>
<td><img src="images/spacer.gif" width=20 height=1 alt=""></td>
<td><img src="images/spacer.gif" width=9 height=1 alt=""></td>
<td><img src="images/spacer.gif" width=13 height=1 alt=""></td>
<td></td>
</tr>
</table>
<!-- End ImageReady Slices -->
</center>
<map name="Map2"><area shape="rect" coords="8,6,212,109" href="index.html">
</map>
<map name="contact_usMap"><area shape="rect" coords="8,4,100,52" href="http://www.gdalliance.com" target="_blank">
</map>
</BODY>

</HTML>
Dec 6 '07 #1
Share this Question
Share on Google+
1 Reply


stepterr
100+
P: 157
It looks like you are calling a function called checkMaxRow but I do not see that function included in your page.
Dec 15 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.