F€T@: Dynamische Buttons werden in einer Tabelle falsch angezeigt.

Beitrag lesen

Hallo!

Ich habe ein für mich ziemlich aussichtsloses Problem.

Ich hätte in mein Projekt gerne dynamische Buttons mit eingebracht nur werden die an einer ganz anderen Stelle angezeigt, als ich es eigentlich will.

Hier der Code, ich hoffe, ihr könnt mir helfen. Hab den uninteressanten Teil ausgeblendet und mit "[...]" gekennzeichnet.

<HTML> <!-- START OF HEAD-DEFINITIONS --> <HEAD>         <title>Page</title>

<script type="text/javascript">                 Normal1 = new Image();                 Normal1.src = "bilder/button_news.jpg";     /* erste Standard-Grafik /                 Highlight1 = new Image();                 Highlight1.src = "bilder/button_news1.jpg"; / erste Highlight-Grafik */

Normal2 = new Image();                 Normal2.src = "button2.gif";     /* zweite Standard-Grafik /                 Highlight2 = new Image();                 Highlight2.src = "button2h.gif"; / zweite Highlight-Grafik */

Normal3 = new Image();                 Normal3.src = "button3.gif";     /* dritte Standard-Grafik /                 Highlight3 = new Image();                 Highlight3.src = "button3h.gif"; / dritte Highlight-Grafik */

/* usw. fuer alle weiteren zu benutzenden Grafiken */

function Bildwechsel (Bildnr, Bildobjekt) {                    window.document.images[Bildnr].src = Bildobjekt.src;                    }         </script>

<style type="text/css">                 body {                         background-image: url(bilder/page_back1.jpg);                         margin: 0px;                 }                     td {                         font-family: arial;                               font-size: 10pt;                               color: #FFFFFF;                     }                 .tableborder {                         background-color:#000000;                 }                 .tableinnav {                         background-color: #202020;                 }                 .maintable {                         background-color: #FFFFFF;                 }                 .navtable {                         background-image: url(bilder/page_back1.jpg);                 }                 a, a:link, a:visited, a:active {                         font-family: arial;                         font-size: 10pt;                         text-decoration: none;                         font-style: normal;                         color: red;                 }                 a:hover {                         font-size: 10pt;                         color: green;                         text-decoration: underline;                 }                 .title {                         color: orange;                         font-size: 24pt;                         font-weight: bold;                 }                 .nav {                         color: orange;                         font-size: 12pt;                         font-weight: bold;                 }         </style> </HEAD> <!-- START OF BODY --> <BODY>         <div align="left">                 <!-- MAIN TABLE -->                 <table cellPadding="0" cellSpacing="0" border="0" width="1000px" align="center">                         <tr>                                  <td class="tableborder">                                         <table cellPadding="0" cellSpacing="0" border="0" width="100%" style="margin-left:0; margin-right:0">                                                 <!-- HEADER -->                                                 <tr class="navtable">                                                         <td colSpan="3" align="center" vAlign="middle">                                                          <img src="bilder/bannerhp_v1.jpg" alt="" border="0">                                                         </td>                                                 </tr>                                                 <tr>                                                         <!-- LEFT NAVIGATION -->                                                         <td style="background-image:url(bilder/navi_left_mitte.jpg)" align="left" vAlign="top" width="190px" class="navtable" nowrap>

<div style="margin-top:0px;"><img src="bilder/navi_left_oben.jpg" alt="" border="0"></div>                                                         <div align="center" style="margin-top:20px;"><img src="bilder/button_login.jpg" alt="" border="0"></div>                                                         <div align="center" style="margin-top:15px;">                                                         <table cellpadding="0" cellspacing="0" border="0" align="center">         <tr>                 <td>

<table cellpadding="0" cellspacing="0" border="0" class="text" style="font-size:11pt; font-family:Times New Roman">  <form action="/cshp/vwar/extra/login.php?action=login" method="post" target="_self">  <input type="hidden" name="from" value="/cshp/vwar/news.php?">   <tr>    <td>Name:&nbsp;</td>   </tr>    <td><input type="text" size="14" maxLength="50" name="loginname"></td>   </tr>   <tr>    <td>Password:&nbsp;</td>   </tr>    <td><input type="password" size="14" maxLength="50" name="loginpassword"></td>   </tr>   <tr align="center" valign="bottom">    <td colspan="2" height="30"><input type="submit" name="action" value="login"></td>   </tr>  </form>  </table>                         </td>         </tr> </table>                                                         </div>                                                         <div align="center" style="margin-top:15px;"><img src="bilder/button_main.jpg" alt="" border="0"></div>                                                         <div align="center" style="margin-top:0px;"><a href="http://www.schweinerudel.de/news.php" onMouseOver="Bildwechsel(0, Highlight1)" onMouseOut="Bildwechsel(0, Normal1)"><img src="bilder/button_news.jpg" alt="" border="0"></a></div>                                                         <div align="center" style="margin-top:0px;"><a href="http://www.schweinerudel.de/gb.php"><img src="bilder/button_guestbook.jpg" alt="" border="0"></div>                                                         <div align="center" style="margin-top:0px;"><a href="http://www.schweinerudel.de/member.php"><img src="bilder/button_member.jpg" alt="" border="0"></div>                                                         <div align="center" style="margin-top:0px;"><a href="http://www.schweinerudel.de/joinus.php"><img src="bilder/button_joinus.jpg" alt="" border="0"></div>                                                         <div align="center" style="margin-top:0px;"><a href="http://www.schweinerudel.de/rules.php"><img src="bilder/button_rules.jpg" alt="" border="0"></div>                                                         <div align="center" style="margin-top:0px;"><img src="bilder/button_rudel.jpg" alt="" border="0"></div>                                                         <div align="center" style="margin-top:0px;"><a href="http://www.schweinerudel.de/kA.php"><img src="bilder/button_squads.jpg" alt="" border="0"></div>                                                         <div align="center" style="margin-top:0px;"><a href="http://www.schweinerudel.de/war.php"><img src="bilder/button_wars.jpg" alt="" border="0"></div>                                                         <div align="center" style="margin-top:0px;"><a href="http://www.schweinerudel.de/fightus.php"><img src="bilder/button_fightus.jpg" alt="" border="0"></div>                                                         <div align="center" style="margin-top:0px;"><a href="http://www.schweinerudel.de/stats.php"><img src="bilder/button_stats.jpg" alt="" border="0"></div>                                                         <div align="center" style="margin-top:0px;"><a href="http://www.schweinerudel.de/warpics.php"><img src="bilder/button_warpics.jpg" alt="" border="0"></div>                                                         <div align="center" style="margin-top:0px;"><img src="bilder/button_media.jpg" alt="" border="0"></div>                                                         <div align="center" style="margin-top:0px;"><a href="http://www.schweinerudel.de/news.php"><img src="bilder/button_downloads.jpg" alt="" border="0"></div>                                                         <div align="center" style="margin-top:0px;"><a href="http://www.schweinerudel.de/gb.php"><img src="bilder/button_gallery.jpg" alt="" border="0"></div>                                                         <div align="center" style="margin-top:0px;"><a href="http://www.schweinerudel.de/member.php"><img src="bilder/button_links.jpg" alt="" border="0"></div>                                                         <div align="center" style="margin-top:0px;"><a href="http://www.schweinerudel.de/joinus.php"><img src="bilder/button_linkus.jpg" alt="" border="0"></div>

</td>                                                         <!-- MAIN CONTENT -->                                                         <td align="center" vAlign="top" width="62%" class="maintable" nowrap> <!-- START OF VWAR --><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

[...]

<!-- END OF VWAR -->                                                         </td>                                                         <!-- RIGHT NAVIGATION -->                                                         <td style="background-image:url(bilder/navi_right_mitte.jpg)" align="right" vAlign="top" width="190px" class="navtable" nowrap>                                                         <div style="margin-top:0px;"><img src="bilder/navi_right_oben.jpg" alt="" border="0"></div>

<!-- FOOTER -->                                                 <tr class="navtable">                                                         <td align="center" colSpan="3">Copyright</td>                                                 </tr>                                         </table>                                 </td>                         </tr>                 </table>         </div> </BODY> </HTML>