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
Webdesign: HTML/CSS, Responsive Design, Sass...
Bereiche der Website sollen nicht neu geladen werden
Beitrag
<blockquote data-quote="skyflight1981" data-source="post: 1140666" data-attributes="member: 92867"><p><strong>AW: Bereiche der Website sollen nicht neu geladen werden</strong></p><p></p><p>@sokie Vielen Dank, für den Link zu Deinem Tutorial. </p><p>Mit der Hilfestellung brauche ich keine weitere Hilfe.</p><p>Ich habe FlashCS3, allerdings haben wir das während </p><p>des Studiums nur angekratzt. Mit dem Video sollte </p><p>ein neuer Header aber kein Problem sein. Ich muss </p><p>sowieso nochmal über die Bilderauswahl nachdenken. </p><p>Wenn das Projekt bald akut wird poste ich meine </p><p>Ergebnisse. </p><p></p><p>@Chriss1987 </p><p></p><p>Ich habe jetzt mal die Code-Fragmente eingearbeitet und </p><p>aktualisiert. Leider habe ich noch Fehler bei der Ausgabe, ich </p><p>vermute dass es an der Abfrage liegt. </p><p></p><p>Ich bin noch nicht soweit dass ich die Hintergründe kenne warum </p><p>man nur bestimmte bei der Ausgabe zulässt. Kann man hier </p><p>manipulieren? </p><p></p><p>Kann man das Menü noch mit Mouseover-Effekten ergänzen?</p><p>Ich habe Glasbuttons die beim überfahren sich farblich ändern </p><p>sollen. Geht dass noch mit dem Ajax-Code?</p><p></p><p>Ich poste mal den Quellcode meiner Dateien, Screenshots folgen </p><p>die Tage mal. </p><p></p><p>Hier die index.html:</p><p></p><p>[code]<!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><head></p><p><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></p><p><title>Kathis Seite</title></p><p><link href="kathis_website01.css" rel="stylesheet" type="text/css" /></p><p><script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script></p><p></head></p><p></p><p> <body></p><p> <!-- hier wird das AJAX-Script eingebunden --></p><p> <script type="text/javascript" src="ajax.js"></script></p><p> <div id="hauptfenster"></p><p> <div id="karte"></div></p><p> <div id="header"></p><p> <script type="text/javascript"></p><p> AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','682','height','165', 'title','Header4_swf','src','Bilder/Header4_am_kleinsten','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','Bilder/Header4_am_kleinsten' ); //end AC code</p><p> </script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="682" height="165" title="Header4_swf"></p><p> <param name="movie" value="Bilder/Header4_am_kleinsten.swf" /></p><p> <param name="quality" value="high" /></p><p> <embed src="Bilder/Header4_am_kleinsten.swf" quality="high" pluginspage= "http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="682" height="165"></embed></p><p> </object></p><p> </noscript></p><p> </div></p><p> <div id="navi"></p><p></p><p> <div id="Button_Startseite"><img src="Bilder/Buttons_neu/Button_Startseite Kopie.png" alt="Startseite" onCl"sndReq('startseite.html')" /></div></p><p> <div id="Button_Tierpsychologie"><img src="Bilder/Buttons_neu/Button_Tierpsychologie Kopie.png" alt="Tierpsychologie" onClick="sndReq('tierpsychologie.html')" /></div></p><p> <div id="Button_Über_mich"><img src="Bilder/Buttons_neu/Button_Über_mich Kopie.png" alt="Über mich" onClick="sndReq('ueber_mich.html')" /></div></p><p> <div id="Button_Arbeitsbereiche"><img src="Bilder/Buttons_neu/Button_Arbeitsbereiche Kopie.png" alt="Arbeitsbereiche" onClick="sndReq('arbeitsbereiche.html')" /></div></p><p> <div id="Button_Ernährungsberatung"><img src="Bilder/Buttons_neu/Button_Ernährungsberatung Kopie.png" alt="Ernährungsberatung" onClick="sndReq('ernaehrungsberatung.html')" /></div></p><p> <div id="Button_Bachblütentherapie"><img src="Bilder/Buttons_neu/Button_Bachblütentherapie Kopie.png" alt="Bachblütentherapie" onClick="sndReq('bachbluetentherapie.html')" /></div></p><p> <div id="Button_Leistungen"><img src="Bilder/Buttons_neu/Button_Leistungen Kopie.png" alt="Leistungen" onClick="sndReq('leistungen.html')" /></div></p><p> <div id="Button_Kontakt"><img src="Bilder/Buttons_neu/Button_Kontakt Kopie.png" alt="Kontakt" onClick="sndReq('kontakt.html')" /></div></p><p> <div id="Button_Gästebuch"><img src="Bilder/Buttons_neu/Button_Gästebuch Kopie.png" alt="Gästebuch" onClick="sndReq('gaestebuch.html')" /></div></p><p> <div id="Button_Impressum"><img src="Bilder/Buttons_neu/Button_Impressum Kopie.png" alt="Impressum" onClick="sndReq('impressum.html')" /></div></div></p><p> </p><p> <div id="content"></p><p> </p><p> </div></p><p> </div></p><p></body></p><p></html>[/code]Hier die stylesheet.css:</p><p></p><p>[code]@charset "utf-8";</p><p>body {</p><p> background-image: url(Bilder/Kathis_Website_Hintergrund.gif);</p><p> background-repeat: repeat-x;</p><p> margin: 0px;</p><p> padding: 0px;</p><p>}</p><p>#hauptfenster {</p><p> width: 1024px;</p><p> float: none;</p><p> margin-top: 0px;</p><p> margin-right: auto;</p><p> margin-bottom: 0px;</p><p> margin-left: auto;</p><p> border: 0px none #000000;</p><p>}</p><p>#karte {</p><p> float: left;</p><p> height: 170px;</p><p> width: 300px;</p><p> margin-left: 12px;</p><p> margin-top: 12px;</p><p> background-image: url(Bilder/karte_hintergrund.png);</p><p> border-top-width: 0px;</p><p> border-right-width: 0px;</p><p> border-bottom-width: 0px;</p><p> border-left-width: 0px;</p><p> border-top-style: none;</p><p> border-right-style: none;</p><p> border-bottom-style: none;</p><p> border-left-style: none;</p><p>}</p><p>#header {</p><p> float: left;</p><p> height: 170px;</p><p> width: 685px;</p><p> margin-top: 12px;</p><p> margin-left: 15px;</p><p> border-top-style: none;</p><p> border-right-style: none;</p><p> border-bottom-style: none;</p><p> border-left-style: none;</p><p> background-image: url(Bilder/Header_Hintergrund_mit_Bild%20Kopie.png);</p><p>}</p><p>#hauptfenster #navi {</p><p> float: left;</p><p> height: auto;</p><p> width: 300px;</p><p> margin-top: 15px;</p><p> margin-left: 12px;</p><p> border-top-style: none;</p><p> border-right-style: none;</p><p> border-bottom-style: none;</p><p> border-left-style: none;</p><p>}</p><p>#content {</p><p> float: left;</p><p> height: auto;</p><p> width: 685px;</p><p> margin-top: 15px;</p><p> margin-left: 15px;</p><p> border-top-width: 0px;</p><p> border-right-width: 0px;</p><p> border-bottom-width: 0px;</p><p> border-left-width: 0px;</p><p> border-top-style: none;</p><p> border-right-style: none;</p><p> border-bottom-style: none;</p><p> border-left-style: none;</p><p> background-image: url(Bilder/content_hintergrund.png);</p><p> }</p><p> </p><p>#content p {</p><p> font-family: Verdana, Arial, Helvetica, sans-serif;</p><p> font-size: 16px;</p><p> margin-top: 5px;</p><p> margin-right: 10px;</p><p> margin-bottom: 5px;</p><p> margin-left: 10px;</p><p>}</p><p>#Button_Tierpsychologie {</p><p> margin-top: 8px;</p><p>}</p><p>#Button_Über_mich img {</p><p> margin-top: 8px;</p><p>}</p><p>#Button_Arbeitsbereiche img {</p><p> margin-top: 8px;</p><p>}</p><p>#Button_Ernährungsberatung img {</p><p> margin-top: 8px;</p><p>}</p><p>#Button_Bachblütentherapie img {</p><p> margin-top: 8px;</p><p>}</p><p>#Button_Leistungen img {</p><p> margin-top: 8px;</p><p>}</p><p>#Button_Kontakt img {</p><p> margin-top: 8px;</p><p>}</p><p>#Button_Gästebuch img {</p><p> margin-top: 8px;</p><p>}</p><p>#Button_Impressum img {</p><p> margin-top: 8px;</p><p>}</p><p>#content div {</p><p> background-color: #FFFFFF;</p><p> background-image: url(Bilder/content_hintergrund.png);</p><p> background-repeat: no-repeat;</p><p>}</p><p>[/code]Hier die ajax.js:</p><p></p><p>[code]var http = null;</p><p></p><p>if (window.XMLHttpRequest)</p><p> {</p><p> http = new XMLHttpRequest();</p><p> }</p><p>else if (window.ActiveXObject)</p><p> {</p><p> http = new ActiveXObject("Microsoft.XMLHTTP");</p><p> }</p><p></p><p>function sndReq(url)</p><p> {</p><p> if (http != null)</p><p> {</p><p> // http.open("POST", "anfrage.php", true);</p><p> http.open("POST", "ausgabe.php", true);</p><p> http.onreadystatechange = ausgeben;</p><p> http.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");</p><p> http.send("url="+url);</p><p> }</p><p> }</p><p></p><p></p><p>function ausgeben()</p><p> {</p><p> if (http.readyState == 4)</p><p> {</p><p> document.getElementById("content").innerHTML = http.responseText;</p><p> }</p><p> else</p><p> {</p><p> document.getElementById("content").innerHTML = "<img src=\"loading.gif\" width=\"50\" heigth=\"50\">";</p><p> }</p><p> }[/code]Hier die ausgabe.php:</p><p></p><p>[code]<?php</p><p></p><p>if (isset($_POST['url']))</p><p> {</p><p> $erlaubte_urls = array("startseite.html","tierpsychologie.html","ueber_mich.html","arbeitsbereiche.html","ernaehrungsberatung.html","bachbluetentherapie.html","leistungen.html","kontakt.html","gaestebuch.html","impressum.html", "seite2.php", "http://www.psd-tutorials.de/modules/Forum/images/seite3.gif");</p><p> if (in_array($_POST['url'], $erlaubte_urls))</p><p> {</p><p> echo file_get_contents($_POST['url']);</p><p> }</p><p> else</p><p> {</p><p> echo "<h1>Zugriff verweigert!</h1>";</p><p> }</p><p> }</p><p>else</p><p> {</p><p> echo "Falscher Parameter!";</p><p> }</p><p></p><p>?> </p><p>[/code]Und hier die startseite.html:</p><p></p><p>[code]<!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><head></p><p><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></p><p><title>Unbenanntes Dokument</title></p><p><link href="content.css" rel="stylesheet" type="text/css" /></p><p></head></p><p></p><p><body></p><p> <div id="inhalt">Startseite</div></p><p></body></p><p></html></p><p>[/code]Eigentlich überflüssig:</p><p></p><p>content.css:</p><p></p><p>[CODE]@charset "utf-8";</p><p>content {</p><p> height: auto;</p><p> width: 682px;</p><p>}[/CODE]</p><p></p><p></p><p>Gruß Marc-Henry</p></blockquote><p></p>
[QUOTE="skyflight1981, post: 1140666, member: 92867"] [b]AW: Bereiche der Website sollen nicht neu geladen werden[/b] @sokie Vielen Dank, für den Link zu Deinem Tutorial. Mit der Hilfestellung brauche ich keine weitere Hilfe. Ich habe FlashCS3, allerdings haben wir das während des Studiums nur angekratzt. Mit dem Video sollte ein neuer Header aber kein Problem sein. Ich muss sowieso nochmal über die Bilderauswahl nachdenken. Wenn das Projekt bald akut wird poste ich meine Ergebnisse. @Chriss1987 Ich habe jetzt mal die Code-Fragmente eingearbeitet und aktualisiert. Leider habe ich noch Fehler bei der Ausgabe, ich vermute dass es an der Abfrage liegt. Ich bin noch nicht soweit dass ich die Hintergründe kenne warum man nur bestimmte bei der Ausgabe zulässt. Kann man hier manipulieren? Kann man das Menü noch mit Mouseover-Effekten ergänzen? Ich habe Glasbuttons die beim überfahren sich farblich ändern sollen. Geht dass noch mit dem Ajax-Code? Ich poste mal den Quellcode meiner Dateien, Screenshots folgen die Tage mal. Hier die index.html: [code]<!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>Kathis Seite</title> <link href="kathis_website01.css" rel="stylesheet" type="text/css" /> <script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script> </head> <body> <!-- hier wird das AJAX-Script eingebunden --> <script type="text/javascript" src="ajax.js"></script> <div id="hauptfenster"> <div id="karte"></div> <div id="header"> <script type="text/javascript"> AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','682','height','165', 'title','Header4_swf','src','Bilder/Header4_am_kleinsten','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','Bilder/Header4_am_kleinsten' ); //end AC code </script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="682" height="165" title="Header4_swf"> <param name="movie" value="Bilder/Header4_am_kleinsten.swf" /> <param name="quality" value="high" /> <embed src="Bilder/Header4_am_kleinsten.swf" quality="high" pluginspage= "http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="682" height="165"></embed> </object> </noscript> </div> <div id="navi"> <div id="Button_Startseite"><img src="Bilder/Buttons_neu/Button_Startseite Kopie.png" alt="Startseite" onCl"sndReq('startseite.html')" /></div> <div id="Button_Tierpsychologie"><img src="Bilder/Buttons_neu/Button_Tierpsychologie Kopie.png" alt="Tierpsychologie" onClick="sndReq('tierpsychologie.html')" /></div> <div id="Button_Über_mich"><img src="Bilder/Buttons_neu/Button_Über_mich Kopie.png" alt="Über mich" onClick="sndReq('ueber_mich.html')" /></div> <div id="Button_Arbeitsbereiche"><img src="Bilder/Buttons_neu/Button_Arbeitsbereiche Kopie.png" alt="Arbeitsbereiche" onClick="sndReq('arbeitsbereiche.html')" /></div> <div id="Button_Ernährungsberatung"><img src="Bilder/Buttons_neu/Button_Ernährungsberatung Kopie.png" alt="Ernährungsberatung" onClick="sndReq('ernaehrungsberatung.html')" /></div> <div id="Button_Bachblütentherapie"><img src="Bilder/Buttons_neu/Button_Bachblütentherapie Kopie.png" alt="Bachblütentherapie" onClick="sndReq('bachbluetentherapie.html')" /></div> <div id="Button_Leistungen"><img src="Bilder/Buttons_neu/Button_Leistungen Kopie.png" alt="Leistungen" onClick="sndReq('leistungen.html')" /></div> <div id="Button_Kontakt"><img src="Bilder/Buttons_neu/Button_Kontakt Kopie.png" alt="Kontakt" onClick="sndReq('kontakt.html')" /></div> <div id="Button_Gästebuch"><img src="Bilder/Buttons_neu/Button_Gästebuch Kopie.png" alt="Gästebuch" onClick="sndReq('gaestebuch.html')" /></div> <div id="Button_Impressum"><img src="Bilder/Buttons_neu/Button_Impressum Kopie.png" alt="Impressum" onClick="sndReq('impressum.html')" /></div></div> <div id="content"> </div> </div> </body> </html>[/code]Hier die stylesheet.css: [code]@charset "utf-8"; body { background-image: url(Bilder/Kathis_Website_Hintergrund.gif); background-repeat: repeat-x; margin: 0px; padding: 0px; } #hauptfenster { width: 1024px; float: none; margin-top: 0px; margin-right: auto; margin-bottom: 0px; margin-left: auto; border: 0px none #000000; } #karte { float: left; height: 170px; width: 300px; margin-left: 12px; margin-top: 12px; background-image: url(Bilder/karte_hintergrund.png); border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; } #header { float: left; height: 170px; width: 685px; margin-top: 12px; margin-left: 15px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; background-image: url(Bilder/Header_Hintergrund_mit_Bild%20Kopie.png); } #hauptfenster #navi { float: left; height: auto; width: 300px; margin-top: 15px; margin-left: 12px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; } #content { float: left; height: auto; width: 685px; margin-top: 15px; margin-left: 15px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; background-image: url(Bilder/content_hintergrund.png); } #content p { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 16px; margin-top: 5px; margin-right: 10px; margin-bottom: 5px; margin-left: 10px; } #Button_Tierpsychologie { margin-top: 8px; } #Button_Über_mich img { margin-top: 8px; } #Button_Arbeitsbereiche img { margin-top: 8px; } #Button_Ernährungsberatung img { margin-top: 8px; } #Button_Bachblütentherapie img { margin-top: 8px; } #Button_Leistungen img { margin-top: 8px; } #Button_Kontakt img { margin-top: 8px; } #Button_Gästebuch img { margin-top: 8px; } #Button_Impressum img { margin-top: 8px; } #content div { background-color: #FFFFFF; background-image: url(Bilder/content_hintergrund.png); background-repeat: no-repeat; } [/code]Hier die ajax.js: [code]var http = null; if (window.XMLHttpRequest) { http = new XMLHttpRequest(); } else if (window.ActiveXObject) { http = new ActiveXObject("Microsoft.XMLHTTP"); } function sndReq(url) { if (http != null) { // http.open("POST", "anfrage.php", true); http.open("POST", "ausgabe.php", true); http.onreadystatechange = ausgeben; http.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); http.send("url="+url); } } function ausgeben() { if (http.readyState == 4) { document.getElementById("content").innerHTML = http.responseText; } else { document.getElementById("content").innerHTML = "<img src=\"loading.gif\" width=\"50\" heigth=\"50\">"; } }[/code]Hier die ausgabe.php: [code]<?php if (isset($_POST['url'])) { $erlaubte_urls = array("startseite.html","tierpsychologie.html","ueber_mich.html","arbeitsbereiche.html","ernaehrungsberatung.html","bachbluetentherapie.html","leistungen.html","kontakt.html","gaestebuch.html","impressum.html", "seite2.php", "http://www.psd-tutorials.de/modules/Forum/images/seite3.gif"); if (in_array($_POST['url'], $erlaubte_urls)) { echo file_get_contents($_POST['url']); } else { echo "<h1>Zugriff verweigert!</h1>"; } } else { echo "Falscher Parameter!"; } ?> [/code]Und hier die startseite.html: [code]<!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>Unbenanntes Dokument</title> <link href="content.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="inhalt">Startseite</div> </body> </html> [/code]Eigentlich überflüssig: content.css: [CODE]@charset "utf-8"; content { height: auto; width: 682px; }[/CODE] Gruß Marc-Henry [/QUOTE]
Bilder bitte
hier hochladen
und danach über das Bild-Icon (Direktlink vorher kopieren) platzieren.
Zitate einfügen…
Authentifizierung
Wenn ▲ = 7, ▼ = 3, ◇ = 2 und die Summe von ▲ und ▼ durch ◇ geteilt wird, was ist das Ergebnis?
Antworten
Start
Forum
Sonstiges
Webdesign, Webentwicklung & Programmierung
Webdesign: HTML/CSS, Responsive Design, Sass...
Bereiche der Website sollen nicht neu geladen werden
Oben