Hallo,
vor einer Woche etwa war ich schonmal hier. Leider bin ich mit meinem Problem noch nicht weiter als vorher. Ich habe ein Javascript das ein DIV sichtbar und unsichtbar machen soll. Ob sinnig oder nicht, ich brauche es, weils vom Chef so gewünscht ist. Leider funktioniert mein Skript zwar auf IE6, aber nicht auf IE5, welches die Zielplattform darstellt.
Als Fehlermeldung kommt immer, wenn ich die Javascript Funktion aufrufe: "Objekt erwartet" die Funktion wird an mehreren Stellen bei mouseover aufgerufen, der Fehler bezieht sich immer auf den Aufruf.
Um euch einen Gesamtüberblick zu verschaffen, werde ich hier das ganze Dokument abbilden. (Theoretisch könntet Ihr den Code so wie er ist nehmen und in ein HTML Dokument pasten.) Ich hoffe wirklich das ihr mir weiterhelfen könnt, es kann nur ein kleiner Fehler sein, aber ich finde ihn nicht.
Ich danke schonmal jedem, der bereit ist sich das hier anzuschauen
Gruß Sonia
Um euch die Suche in dem Wust zu erleichtern: Die Funktionen aufrufende Stellen sind
--> 1.<body bgColor="#ffffff" onload="verbergen'DivCalVon');verbergen('DivCalBis');" MS_POSITIONING="GridLayout">
2.<DIV id="DivCalVon" onmouseover="zeigen('DivCalVon');" style="Z-INDEX: 111; LEFT: 193px; WIDTH: 153px; POSITION: absolute; TOP: 140px; HEIGHT: 136px" onmouseout="verbergen('DivCalVon');" ms_positioning="GridLayout">
3.<DIV id="DivCalBis" onmouseover="zeigen('DivCalBis');" style="Z-INDEX: 112; LEFT: 518px; WIDTH: 155px; POSITION: absolute; TOP: 143px; HEIGHT: 136px" onmouseout="verbergen('DivCalBis');" ms_positioning="GridLayout">
- <A onmouseover="zeigen('DivCalBis');" onmouseout="verbergen('DivCalBis');" href="#"><IMG style="Z-INDEX: 109; LEFT: 653px; POSITION: absolute; TOP: 148px" alt="Kalender öffnen" src="pfeil.JPG"></A> <---
Die Funktionen "zeigen" und "verbergen" befinden sich gleich zu Anfang unter den Meta Tags
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" > <HTML> <HEAD> <title>Searchform</title> <meta content="Microsoft Visual Studio 7.0" name="GENERATOR"> <meta content="C#" name="CODE_LANGUAGE"> <meta content="JavaScript" name="vs_defaultClientScript"> <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema"> <script type="text/javascript"> <!-- function zeigen(obj) { var ns4; var ie4; var ie5; var v6; ns4 = (document.layers)? true:false ie4 = (document.all)? true:false ie5= (document.all)?true:false v6 = (document.getElementById)? true:false
if (ns4) { document.layers[obj].visibility = "show"; } else if (v6) { document.getElementById(obj).style.visibility = "visible"; } else if (ie4) { document.all[obj].style.visibility = "visible"; } return eval(obj); }
function verbergen(obj) { var ns4; var ie4; var ie5; var v6; ns4 = (document.layers)? true:false; ie4 = (document.all)? true:false; ie5= (document.all)?true:false; v6 = (document.getElementById)? true:false;
if (document.layers) { document.layers[obj].visibility = "hide"; } else if (document.getElementById) { document.getElementById(obj).style.visibility = "hidden"; } else if (document.all[obj]) { document.all[obj].style.visibility = "hidden"; } return eval(obj); } //--> </script> </HEAD> <body bgColor="#ffffff" onload="verbergen'DivCalVon');verbergen('DivCalBis');" MS_POSITIONING="GridLayout"> <form name="Form1" method="post" action="SearchForm.aspx" id="Form1"> <input type="hidden" name="__EVENTTARGET" value="" /> <input type="hidden" name="__EVENTARGUMENT" value="" /> <input type="hidden" name="__VIEWSTATE" value="--snip--"
<script language="javascript"> <!-- function __doPostBack(eventTarget, eventArgument) { var theform = document.Form1; theform.__EVENTTARGET.value = eventTarget; theform.__EVENTARGUMENT.value = eventArgument; theform.submit(); } // --> </script>
<table id="STable" style="Z-INDEX: 101; LEFT: 1px; POSITION: absolute; TOP: 0px" height="0" cellspacing="1" cellpadding="0" width="100%" border="1"> </table>
<DIV id="DivCalBis" onmouseover="zeigen('DivCalBis');" style="Z-INDEX: 112; LEFT: 518px; WIDTH: 155px; POSITION: absolute; TOP: 143px; HEIGHT: 136px" onmouseout="verbergen('DivCalBis');" ms_positioning="GridLayout"> <table id="CalBis" cellspacing="0" cellpadding="1" bordercolor="#3366CC" border="0" style="color:#003399;background-color:White;border-color:#3366CC;border-width:1px;border-style:solid;font-family:Verdana;font-size:8pt;height:132px;width:151px;border-collapse:collapse;LEFT: 1px; POSITION: absolute; TOP: 1px"> <tr>umfangreiche Tabelle</tr> </table> </DIV> <DIV id="DivCalVon" onmouseover="zeigen('DivCalVon');" style="Z-INDEX: 111; LEFT: 193px; WIDTH: 153px; POSITION: absolute; TOP: 140px; HEIGHT: 136px" onmouseout="verbergen('DivCalVon');" ms_positioning="GridLayout"> <table id="CalVon" cellspacing="0" cellpadding="1" bordercolor="#3366CC" border="0" style="color:#003399;background-color:White;border-color:#3366CC;border-width:1px;border-style:solid;font-family:Verdana;font-size:8pt;height:132px;width:151px;border-collapse:collapse;LEFT: 0px; POSITION: absolute; TOP: 2px"> <td>UMFANGREICHE TABELLE</td></table> </DIV> <TABLE id="Table1" style="Z-INDEX: 102; LEFT: 3px; POSITION: absolute; TOP: 3px" height="78" cellSpacing="0" cellPadding="1" width="690" border="0"> <TR> <TD align="middle" width="87" bgColor="#996666" height="18"><span id="Label2" style="color:White;background-color:#996666;font-family:Verdana;font-size:Smaller;font-weight:bold;">Location:</span></TD> <TD align="left" width="299" bgColor="#996666" height="18"><span id="Label1" style="color:White;background-color:#996666;font-family:Verdana;font-size:Smaller;font-weight:bold;width:87px;">Suchbereich:</span></TD> <TD bgColor="#996666" height="18"><span id="maxHits" style="color:White;background-color:#996666;font-family:Verdana;font-size:Smaller;font-weight:bold;">maximale Treffer:</span></TD> <TD bgColor="#996666"></TD> </TR> <TR> <TD align="middle" width="87" bgColor="#000066" height="13"></TD> <TD align="left" width="299" bgColor="#000066" height="13"><select name="DDLSuch" id="DDLSuch" onchange="__doPostBack('DDLSuch','')" language="javascript" style="font-family:Verdana;width:245px;"> <option value=""></option> <option value="one">one</option> <option value="two">two</option> <option value="three">three</option>
</select></TD> <TD bgColor="#000066" height="13"><select name="DDLmaxHit" id="DDLmaxHit" style="font-family:Verdana;height:21px;width:114px;"> <option selected="selected" value="1">1</option> <option value="2">2</option>
</select></TD> <TD bgColor="#000066"></TD> </TR> <TR> <TD width="87" bgColor="#000066"><span id="lblPass" style="color:White;font-family:Verdana;font-size:Smaller;width:151px;"></span></TD> <TD width="299" bgColor="#000066"><span id="lblUser" style="color:White;font-family:Verdana;font-size:Smaller;width:155px;"></span></TD> <TD bgColor="#000066"></TD> <TD bgColor="#000066"></TD> </TR> </TABLE> <A onmouseover="zeigen('DivCalVon');" onmouseout="verbergen('DivCalVon');" href="#"> <IMG id="IMG1" style="Z-INDEX: 107; LEFT: 328px; POSITION: absolute; TOP: 149px" alt="Kalender öffnen" src="pfeil.JPG"></A> <DIV id="DivLok" style="Z-INDEX: 103; LEFT: 3px; WIDTH: 154px; POSITION: absolute; TOP: 81px; HEIGHT: 100%; BACKGROUND-COLOR: #000066" ms_positioning="GridLayout"><table id="CBLLok" border="0" style="color:White;font-family:Verdana;font-size:XX-Small;font-weight:bold;LEFT: 12px; POSITION: absolute; TOP: 9px"> <tr> <td><input id="CBLLok_0" type="checkbox" name="CBLLok:0" /><label for="CBLLok_0">Hamburg</label></td> </tr><tr> <td><input id="CBLLok_1" type="checkbox" name="CBLLok:1" /><label for="CBLLok_1">Frankfurt</label></td> </tr> </table></DIV> <span id="Label3" style="font-family:Verdana;font-size:8pt;font-weight:bold;width:51px;Z-INDEX: 104; LEFT: 191px; POSITION: absolute; TOP: 91px">von:</span><span id="Label4" style="font-family:Verdana;font-size:8pt;font-weight:bold;width:51px;Z-INDEX: 105; LEFT: 592px; POSITION: absolute; TOP: 93px">bis:</span><input name="TxtVon" type="text" value="6.11.2002" id="TxtVon" style="font-family:Verdana;Z-INDEX: 106; LEFT: 191px; POSITION: absolute; TOP: 115px" /><input name="TxtBis" type="text" value="6.11.2002" id="TxtBis" style="font-family:Verdana;Z-INDEX: 108; LEFT: 516px; POSITION: absolute; TOP: 116px" /> <A onmouseover="zeigen('DivCalBis');" onmouseout="verbergen('DivCalBis');" href="#"> <IMG style="Z-INDEX: 109; LEFT: 653px; POSITION: absolute; TOP: 148px" alt="Kalender öffnen" src="pfeil.JPG"></A> </form> <TABLE id="Table2" style="Z-INDEX: 110; LEFT: 191px; POSITION: absolute; TOP: 172px" height="98" cellSpacing="0" cellPadding="0" width="77" border="0"> <TR> <TD> <form action="SearchForm.aspx" method="get"> <DIV id="DIV1" style="WIDTH: 511px; POSITION: relative; HEIGHT: 317px; BACKGROUND-COLOR: #000066" ms_positioning="GridLayout"><span id="lblOutput" style="LEFT: 198px; POSITION: absolute; TOP: 157px">INn</span></DIV> <input type="submit" id="BtnSearch" Font-Names="Verdana" Text="Suchen"> </form> </TD> </TR> <TR> <TD> <DIV id="DivHitList" style="WIDTH: 511px; POSITION: relative; HEIGHT: 114px" ms_positioning="GridLayout"></DIV> </TD> </TR> </TABLE> </body> </HTML>