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.

Empfohlene Antworten

Veröffentlicht


<SCRIPT LANGUAGE="JavaScript1.2">

<!--


var width = screen.width;

if(location.search.indexOf("&width") == -1)

{

  location = location.href + "&?width=" + width;     // Bildschirmbreite in $width gespeichert.

}


var height = screen.height;

if(location.search.indexOf("&height") == -1)

{

  location = location.href + "?&height=" + height;   // Bildschirmhöhe in $height gespeichert

}


//-->

</SCRIPT>

Wenn ich nun unter php mit echo $width; die Bildschirmbreite ausgeben lasse steht hinter der Auflösung immer ein Fragezeichen. Wenn ich hingegen mit echo $height die Höhe ausgeben lasse, steht dies nicht dahinter. Wieso also bei $width? :confused:

Jemand ne Idee bzw. weiss vielleicht jemand wie ich das Fragezeichen da wegbekomme?

hi

wie sieht den die komplette url aus?

schon in diesem format: www.url.de/test.php?height=1024&width=768 ?

ich glaub du hast ein paar fragezeichen zuviel drin, kann das sein ? !

und hier passiert glaubich der fehler:

location = location.href + "?&height=" + height; // Bildschirmhöhe in $height gespeichert

richtig :

location = location.href + "&height=" + height; // Bildschirmhöhe in $height gespeichert

oder?

ciao

jayjay

Hi,

schau mal, bei width schreibst Du location = location.href + "&?width=" + width;

und bei height location = location.href + "?&height=" + height;

Mir ist aufgefallen, daß Du bei width "&?" schreibst und bei hight "?&"

Mach bei width auch mal ?&, dann müßte das Fragezeichen bei Deiner anzeige weg sein.

Gruß Snopsy

  • Autor
Originally posted by snopsy

Hi,

schau mal, bei width schreibst Du location = location.href + "&?width=" + width;

und bei height location = location.href + "?&height=" + height;

Mir ist aufgefallen, daß Du bei width "&?" schreibst und bei hight "?&"

Mach bei width auch mal ?&, dann müßte das Fragezeichen bei Deiner anzeige weg sein.

Gruß Snopsy

Hey cool. ist mir noch gar nicht aufgefallen. Da hab ich wohl vor lauter Bäumen den Wald nciht mehr gesehen... ;) thx.

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

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.