Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Brwosererkennung und Weiterleitung

Empfohlene Antworten

Hallo zusammen,

ich will in meine HP eine Browsererkennung einbauen und je nachdem, welcher Browser verwendet wird eine andere Darstellung. Ich habe nämlich das Problem, daß eine Grafik beim NS 4.* an anderer Stelle dargestellt wird wie beim NS6 oder IE

Hier mal mein Code, den ich dafür verwende:

<script type="text/javascript">
<!--
if(navigator.appName =="Netscape" && navigator.appVersion.substring(0,1) == "4")
{
<div align="center">
<table width="100%" height="100%" border="1" bordercolor="blue">
<tr>
<td width="100%" height="100%" valign="bottom"><img src="bild.jpg" width="400" height="36" border="0" alt=""></td>
</tr>
</table>
</div>
}

else
{
<div style="position:absolute;bottom:0px;left:0px;">
<img src="bild.jpg" width="400" height="36" border="0" alt="">
</div>
}

//-->
</script[/PHP]

Leider wir hier meine Grafik nicht angezeigt. Wenn ich jedoch nach dem If und else eine alert box anzeigen lassen will, das funktioniert einwandfrei. Woran liegt das, daß meine Grafik jetzt gar nicht angezeigt wird?

Danke & Gruß Snopsy

so, hab die Lösung gerade selber gefunden. Innerhalb von Javascript kann ich ja net einfach HTML-Code reintippen, sondern muß ein document.write davor machen und das ganze dann in Klammer schreiben :)

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Konto

Navigation

Suchen

Suchen

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.