PSD-Tutorials.de
Forum für Design, Fotografie & Bildbearbeitung
Tutkit
Agentur
Hilfe
Kontakt
Start
Forum
Aktuelles
Besonderer Inhalt
Foren durchsuchen
Tutorials
News
Anmelden
Kostenlos registrieren
Aktuelles
Suche
Suche
Nur Titel durchsuchen
Von:
Menü
Anmelden
Kostenlos registrieren
App installieren
Installieren
JavaScript ist deaktiviert. Für eine bessere Darstellung aktiviere bitte JavaScript in deinem Browser, bevor du fortfährst.
Du verwendest einen veralteten Browser. Es ist möglich, dass diese oder andere Websites nicht korrekt angezeigt werden.
Du solltest ein Upgrade durchführen oder einen
alternativen Browser
verwenden.
Antworten auf deine Fragen:
Neues Thema erstellen
Start
Forum
Sonstiges
Webdesign, Webentwicklung & Programmierung
PHP, Javascript, jQuery, Ajax, nodeJS, MySQL...
Javascript-Problem - Nur Online
Beitrag
<blockquote data-quote="Sturmkraehe" data-source="post: 984926" data-attributes="member: 67175"><p><strong>AW: Javascript-Problem - Nur Online</strong></p><p></p><p>Hallo,</p><p>also ich habs dir mal "hingebastelt",</p><p>2 Anmerkungen:</p><p>1. Das Menü weiß doch garnicht das es in "links" sein muss, du solltest es schon aufrufen...!</p><p>2. Was hast du bitte hier gemacht:</p><p>[PHP]</p><p><script src="php/menu.php" type="text/php"></script></p><p>[/PHP]</p><p>PHP ist serverseitig, das hat mit dem browser nichts zu tun, mit PHP kann man HTML code generieren oder verändern.</p><p></p><p></p><p>index.php</p><p>[PHP]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"></p><p><html xmlns="http://www.w3.org/1999/xhtml"></p><p></p><p><head></p><p><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></p><p><title>Ulmer und Ulbricht | Rechtsanwälte und Steuerberater</title></p><p></p><p><link href="css/style.css" rel="stylesheet" type="text/css"/></p><p></p><p></p><p></head></p><p></p><p><body></p><p> <div id="container"></p><p> <div id="header"><h1>Ulmer &amp; Ulbricht</h1><h2>Rechtsanwälte &amp; Steuerberater</h2></p><p> </div></p><p> </p><p> <div id="left"></p><p><?</p><p>$xmlMenu = simplexml_load_file('./data/data.xml');</p><p>foreach ($xmlMenu as $menu){</p><p> ?><a href="<? echo $menu['link'] ?>" class="<? echo $menu['class'] ?>" title="<? echo $menu['title'] ?>"><? echo $menu['title'] ?></a><br /><?</p><p>}</p><p>?> </p><p> </div></p><p></p><p> </p><p> <div id="content"></p><p> <h3>Home </h3></p><p> <p>Willkommen auf der Website Ihrer Kanzlei Ulmer und Ulbricht.</p></p><p> <p>Wir freuen uns über Ihren Besuch unseres neu gestalteten Webauftritts und wünschen Ihnen viel Spaß und umfassende Information. Sollten Sie Fragen haben scheuen Sie sich nicht uns zu kontaktieren. Wir freuen uns schon jetzt auf eine erfolgreiche Zusammenarbeit um Ihr Problem zu lösen.</p></p><p> <p>Ihre Kanzlei</p></p><p> <p>Ulmer &amp; Ulbricht</p></p><p></p><p> </div></p><p> </p><p> <div id="footer"></p><p> <hr /> Copyright Ulmer &amp; Ulbricht | 2008</p><p> </div></p><p> </p><p> </div></p><p></p><p></p><p></p><p></body></p><p></p><p></p><p></p><p></p><p></html>[/PHP]</p><p></p><p></p><p></p><p>css/style.css</p><p>[CODE]</p><p>@charset "UTF-8";</p><p>/* CSS Document */</p><p></p><p>/* Layout */</p><p></p><p>body {</p><p> font:Arial, Helvetica, sans-serif;</p><p> font-size:12px;</p><p> cursor:default;</p><p> background-color:#FFFFFF;</p><p> }</p><p> </p><p>#container {</p><p> font-family:Arial, Helvetica, sans-serif;</p><p> width:800px;</p><p> margin-left:auto;</p><p> margin-right:auto;</p><p> text-align:left;</p><p> background-color: #FFFFFF;</p><p> margin-top: 0px;</p><p> }</p><p> </p><p>#header {</p><p> width:100%;</p><p> background-color:#FFFFFF;</p><p> background-image: url(../logo.jpg);</p><p> height: 50px;</p><p> padding-top: 15px;</p><p> padding-right: 0px;</p><p> padding-bottom: 5px;</p><p> padding-left: 0px;</p><p> margin-bottom: 10px;</p><p> }</p><p> </p><p>#left {</p><p> float:left;</p><p> width:150px;</p><p> padding:0px 0px 0px 0px;</p><p> margin: 1px 0px 5px 0px;</p><p> }</p><p> </p><p>#content {</p><p> border-left:1px solid #CC0000;</p><p> border-top:1px solid #FFFFFF;</p><p> margin-top: 0px;</p><p> margin-right: 0px;</p><p> margin-bottom: 5px;</p><p> margin-left: 160px;</p><p> text-align:justify;</p><p> padding-top: 0px;</p><p> padding-right: 5px;</p><p> padding-bottom: 5px;</p><p> padding-left: 5px;</p><p> white-space: 3;</p><p> line-height: 1.3em;</p><p> min-height:200px;</p><p> }</p><p></p><p>#footer {</p><p> clear:both;</p><p> width:100%;</p><p> padding:3px 0px 5px 0px;</p><p> font-size:10px;</p><p> color:#666666;</p><p> }</p><p></p><p>/* Schriften */</p><p></p><p>.spacer {</p><p> width: 100%;</p><p> height: 15px;</p><p>}</p><p></p><p>h1 {</p><p> font-size:24px;</p><p> color:#333333;</p><p> font-weight:100;</p><p> letter-spacing: 0em;</p><p> line-height:0.1em;</p><p> font-family: sans-serif;</p><p> }</p><p> </p><p>h2 {</p><p> font-size:14px;</p><p> color:#CCCCCC;</p><p> font-weight:100;</p><p> line-height:0.1em;</p><p> }</p><p></p><p>h3 {</p><p> font-size:18px;</p><p> color:#333333;</p><p> font-weight:100;</p><p> }</p><p> </p><p>h5 {</p><p> color:#000000;</p><p> font-weight: bold;</p><p> line-height: 1em;</p><p> font-size: 13px;</p><p> }</p><p> </p><p>h6 {</p><p> color:#999999;</p><p> line-height: 1em;</p><p> font-size: 12px;</p><p> font-weight: lighter;</p><p> }</p><p> </p><p>hr {</p><p> border: 1px;</p><p> border-color:#CC0000;</p><p> color: #CC0000;</p><p> background-color: #CC0000;</p><p> height: 1px;</p><p> width: 100%;</p><p> text-align: left;</p><p>}</p><p></p><p></p><p>ul#menu, ul#menu ul {</p><p> list-style-type:none;</p><p> margin: 10px;</p><p> padding: 0;</p><p> width:100%;</p><p>}</p><p></p><p>ul#menu a {</p><p> display: block;</p><p> text-decoration: none;</p><p> color: #333333;</p><p>}</p><p></p><p>ul#menu li {</p><p>}</p><p></p><p>ul#menu li a {</p><p> color: black;</p><p> padding: 0.3em;</p><p> font-weight:bold;</p><p>}</p><p></p><p>ul#menu li a:hover {</p><p> color: #CC0000;</p><p>}</p><p></p><p>ul#submenu {</p><p> text-decoration:none;</p><p> list-style-type: none;</p><p> margin: 0px;</p><p> padding: 0px;</p><p> margin-bottom: 10px;</p><p> }</p><p>ul#submenu li a {</p><p> width:150px;</p><p> float:left;</p><p> font-weight: bolder;</p><p> color: #000000;</p><p> text-decoration: none;</p><p> }</p><p>.subcontent {</p><p> margin-top: 10px;</p><p> margin-right: 10px;</p><p> margin-bottom: 10px;</p><p> margin-left: 0px;</p><p> padding-left:10px;</p><p> line-height: 1.5em;</p><p> list-style-type: square;</p><p> display:block;</p><p> height:auto;</p><p> }</p><p> </p><p>.acc {</p><p> list-style:none;</p><p> padding-left: 0px;</p><p> margin-bottom: 10px;</p><p> margin-top: 10px;</p><p> height: auto;</p><p> }</p><p></p><p>.acc_header {</p><p> color:#000000;</p><p> text-decoration:none;</p><p> font-weight: bold;</p><p> font-size: 13px;</p><p> }</p><p> </p><p>.acc li {</p><p> margin-top: 10px;</p><p> margin-bottom: 10px;</p><p> border-top-width: 1px;</p><p> border-top-style: solid;</p><p> border-top-color: #CC0000;</p><p> padding-top:10px;</p><p>}</p><p></p><p>[/CODE]</p><p></p><p>data/data.xml</p><p>[CODE]</p><p><?xml version="1.0" encoding="utf-8"?><menu></p><p><menu title="Home" class="main" link="index.html"></p><p> </menu></p><p><menu title="Philosophie" class="main" link="philosophie.html"></p><p> </menu></p><p><menu title="Aktuelles" class="main" link="aktuell.html"></p><p> </menu></p><p><menu title="Biografien" class="main" link="biografien.html"></p><p> </menu></p><p><menu title="Rechtsberatung" class="main" link="rechtsberatung.html"></p><p> </menu></p><p><menu title="Steuerberatung" class="main" link="steuerberatung.html"></p><p> </menu></p><p><menu title="Kontakt" class="main" link="kontakt.html"></p><p> </menu></p><p><menu title="Impressum" class="main" link="impressum.html"></p><p> </menu></p><p></menu></p><p>[/CODE]</p><p></p><p>js/jquery-latest.js</p><p>enfällt</p><p></p><p>lg</p><p>Sturmi</p><p></p><p>P.S.</p><p>ein weiteres + ist das Traffik reduziert wird da die js datei nicht jedesmal wieder runtergeladen wird!</p></blockquote><p></p>
[QUOTE="Sturmkraehe, post: 984926, member: 67175"] [b]AW: Javascript-Problem - Nur Online[/b] Hallo, also ich habs dir mal "hingebastelt", 2 Anmerkungen: 1. Das Menü weiß doch garnicht das es in "links" sein muss, du solltest es schon aufrufen...! 2. Was hast du bitte hier gemacht: [PHP] <script src="php/menu.php" type="text/php"></script> [/PHP] PHP ist serverseitig, das hat mit dem browser nichts zu tun, mit PHP kann man HTML code generieren oder verändern. index.php [PHP]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Ulmer und Ulbricht | Rechtsanwälte und Steuerberater</title> <link href="css/style.css" rel="stylesheet" type="text/css"/> </head> <body> <div id="container"> <div id="header"><h1>Ulmer & Ulbricht</h1><h2>Rechtsanwälte & Steuerberater</h2> </div> <div id="left"> <? $xmlMenu = simplexml_load_file('./data/data.xml'); foreach ($xmlMenu as $menu){ ?><a href="<? echo $menu['link'] ?>" class="<? echo $menu['class'] ?>" title="<? echo $menu['title'] ?>"><? echo $menu['title'] ?></a><br /><? } ?> </div> <div id="content"> <h3>Home </h3> <p>Willkommen auf der Website Ihrer Kanzlei Ulmer und Ulbricht.</p> <p>Wir freuen uns über Ihren Besuch unseres neu gestalteten Webauftritts und wünschen Ihnen viel Spaß und umfassende Information. Sollten Sie Fragen haben scheuen Sie sich nicht uns zu kontaktieren. Wir freuen uns schon jetzt auf eine erfolgreiche Zusammenarbeit um Ihr Problem zu lösen.</p> <p>Ihre Kanzlei</p> <p>Ulmer & Ulbricht</p> </div> <div id="footer"> <hr /> Copyright Ulmer & Ulbricht | 2008 </div> </div> </body> </html>[/PHP] css/style.css [CODE] @charset "UTF-8"; /* CSS Document */ /* Layout */ body { font:Arial, Helvetica, sans-serif; font-size:12px; cursor:default; background-color:#FFFFFF; } #container { font-family:Arial, Helvetica, sans-serif; width:800px; margin-left:auto; margin-right:auto; text-align:left; background-color: #FFFFFF; margin-top: 0px; } #header { width:100%; background-color:#FFFFFF; background-image: url(../logo.jpg); height: 50px; padding-top: 15px; padding-right: 0px; padding-bottom: 5px; padding-left: 0px; margin-bottom: 10px; } #left { float:left; width:150px; padding:0px 0px 0px 0px; margin: 1px 0px 5px 0px; } #content { border-left:1px solid #CC0000; border-top:1px solid #FFFFFF; margin-top: 0px; margin-right: 0px; margin-bottom: 5px; margin-left: 160px; text-align:justify; padding-top: 0px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; white-space: 3; line-height: 1.3em; min-height:200px; } #footer { clear:both; width:100%; padding:3px 0px 5px 0px; font-size:10px; color:#666666; } /* Schriften */ .spacer { width: 100%; height: 15px; } h1 { font-size:24px; color:#333333; font-weight:100; letter-spacing: 0em; line-height:0.1em; font-family: sans-serif; } h2 { font-size:14px; color:#CCCCCC; font-weight:100; line-height:0.1em; } h3 { font-size:18px; color:#333333; font-weight:100; } h5 { color:#000000; font-weight: bold; line-height: 1em; font-size: 13px; } h6 { color:#999999; line-height: 1em; font-size: 12px; font-weight: lighter; } hr { border: 1px; border-color:#CC0000; color: #CC0000; background-color: #CC0000; height: 1px; width: 100%; text-align: left; } ul#menu, ul#menu ul { list-style-type:none; margin: 10px; padding: 0; width:100%; } ul#menu a { display: block; text-decoration: none; color: #333333; } ul#menu li { } ul#menu li a { color: black; padding: 0.3em; font-weight:bold; } ul#menu li a:hover { color: #CC0000; } ul#submenu { text-decoration:none; list-style-type: none; margin: 0px; padding: 0px; margin-bottom: 10px; } ul#submenu li a { width:150px; float:left; font-weight: bolder; color: #000000; text-decoration: none; } .subcontent { margin-top: 10px; margin-right: 10px; margin-bottom: 10px; margin-left: 0px; padding-left:10px; line-height: 1.5em; list-style-type: square; display:block; height:auto; } .acc { list-style:none; padding-left: 0px; margin-bottom: 10px; margin-top: 10px; height: auto; } .acc_header { color:#000000; text-decoration:none; font-weight: bold; font-size: 13px; } .acc li { margin-top: 10px; margin-bottom: 10px; border-top-width: 1px; border-top-style: solid; border-top-color: #CC0000; padding-top:10px; } [/CODE] data/data.xml [CODE] <?xml version="1.0" encoding="utf-8"?><menu> <menu title="Home" class="main" link="index.html"> </menu> <menu title="Philosophie" class="main" link="philosophie.html"> </menu> <menu title="Aktuelles" class="main" link="aktuell.html"> </menu> <menu title="Biografien" class="main" link="biografien.html"> </menu> <menu title="Rechtsberatung" class="main" link="rechtsberatung.html"> </menu> <menu title="Steuerberatung" class="main" link="steuerberatung.html"> </menu> <menu title="Kontakt" class="main" link="kontakt.html"> </menu> <menu title="Impressum" class="main" link="impressum.html"> </menu> </menu> [/CODE] js/jquery-latest.js enfällt lg Sturmi P.S. ein weiteres + ist das Traffik reduziert wird da die js datei nicht jedesmal wieder runtergeladen wird! [/QUOTE]
Bilder bitte
hier hochladen
und danach über das Bild-Icon (Direktlink vorher kopieren) platzieren.
Zitate einfügen…
Authentifizierung
Wenn ★ = 12, ◇ = 4 und die Hälfte von ★ zu ◇ addiert wird, was ist das Ergebnis?
Antworten
Start
Forum
Sonstiges
Webdesign, Webentwicklung & Programmierung
PHP, Javascript, jQuery, Ajax, nodeJS, MySQL...
Javascript-Problem - Nur Online
Oben