Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Object Expected error in Internet Explorer

Status
Not open for further replies.

LOW

Programmer
Sep 27, 2000
45
US
I have two google search boxes on a page. Although, they both work fine in Firefox, in Internet Explorer, I get the error "Object Expected" when I hover over the first search box. It also is not function when I click on the submit button. When this search box is on a page alone, I don't get the error and the search works. The following is my code.

<!--Code for global google search-->

<form method="get" action=" target="_self" name="googleSearch" id="googleSearch">
<input type="hidden" name="site" value="sandiego_gov">
<input type="hidden" name="client" value="sandiego_gov">
<input type="hidden" name="proxystylesheet" value="sandiego_gov">
<input type="hidden" name="restrict" value="sandiego_gov">
<input type="hidden" name="output" value="xml_no_dtd">
<table width="150" cellpadding="0" cellspacing="0" border="0" >
<tr>
<td align="right" valign="middle"><input type="text" name="q" id="q" size="11" maxlength="255" value="" class="search"></td>
<td align="right" valign="top"><label for="q"><a href="javascript:document.googleSearch.submit();" name="btnG" onmouseover="javascript:imgOn('search');" onmouseout="javascript:imgOff('search');"><img src=" width="57" height="23" border="0" hspace="0" alt="Search" name="search" id="search"></a></label></td>

</tr>
</table>
</form>


<!--Code for Cd8 google search-->
<form target="searchResults" method="get" action=" name="Search" id="googleSearch">
<input value="xml_no_dtd" name="output" type="hidden">
<input value="sandiego_gov" name="client" type="hidden">
<input value="sandiego_gov" name="proxystylesheet" type="hidden">
<input value="sdcd8" name="site" type="hidden">
<table width="200" height="23" align="right" valign="top" cellpadding="0" cellspacing="0" border="0" style="margin-top:0em; padding-top:0em;">
<tr valign="top">
<td height="23" width="120" nowrap align="right" valign="top" style="margin-top:0em; padding-top:0em;"><input name="q" id="q" type="text" size="14" maxlength="255"></td><td width="80" align="right"><a href="javascript:document.Search.submit();" name="btn8"><img src="/citycouncil/cd8/graphics/searchcd8.gif" width="75" height="23" border="0" hspace="0" alt="Search CD8" name="search" id="search"></a></td>
</tr>
</table>
</form>
 
well you of course haven't provided your imgOn and imgOff functions, so I can only assume they don't exist, which would clearly cause the error on mouse over or out.



*cLFlaVA
----------------------------
[tt]mr. pibb + red vines = crazy delicious![/tt]

[URL unfurl="true"]http://www.coryarthus.com/[/url]
 
Actually, that is in a separate .js file. This code works fine when not included on the same page with the second search box. For some reason, when the second box is added to the page, the first search box no longer functions.
 
That resolved the problem. Thank you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top