witam!
Jest może możliwość sprawdzenia przez stronę (php, html itp.) jaką ma użytkownik rozdzielczość i do rozdzielczości przypisac np. zmienną?
albo instrukcję warunkową, że wyswietla dany kod przy danej rozdzielczosci?
<?php echo " <script LANGUAGE='JavaScript'> <!-- This script and many more are available free online at --> <!-- The JavaScript Source!! <a href=\"http://javascript.internet.com\" target=\"_blank\">http://javascript.internet.com</a> --> <!-- Original: Hamid F. Fard (hamid@petanet.com ) --> <!-- Web Site: <a href=\"http://www.petanet.com\" target=\"_blank\">http://www.petanet.com</a> --> <!-- Begin var ScrnSize = 'UnCommon' if (navigator.appVersion.indexOf('4.') != -1 && navigator.appName.indexOf('Explorer') != -1) { ScrnSize = screen.width + 'x' + screen.height; } if (navigator.appVersion.indexOf('4.') != -1 && navigator.appName.indexOf('Netscape') != -1) { ScrnSize = screen.width + 'x' + (screen.height + 19); //Netscape sees 19 pixels less on Height } switch(ScrnSize) { case '640x480': document.write('<body bgcolor='#FF0000' text='#000000'>'); case '800x600': document.write('<body bgcolor='#00FF00' text='#000000'>'); case '1024x768': document.write('<body bgcolor='#0000FF' text='#000000'>'); case '1152x864': document.write('<body bgcolor='#FFFF00' text='#000000'>'); case '1280x1024': document.write('<body bgcolor='#AA0000' text='#000000'>'); case '1600x1200': document.write('<body bgcolor='#FF00FF' text='#000000'>'); case '1600x1280': document.write('<table align=left border=0 style='position: absolute; top: 0; left:20%; z-index: 0'> <tr><td> ".$baner12." ".$baner13." ".$baner14." ".$baner15." ".$baner16." </tr></td> <br><br> </body> </html>'); default: document.write('<body bgcolor='#FFFFFF' text='#000000'>'); } // The following 3 lines are for display only. They can safely be removed. document.write('Browser Type=' + navigator.appName + '<BR>'); document.write('Browser Version=' + navigator.appVersion + '<BR>'); document.write('Screen Resolution=' + screen.width + 'x' + screen.height); // End --> </script>"; ?>
<?php echo " <script type='text/javascript'> var Szer = screen.width; if (Szer <= 1280) document.write('".$baner12." ".$baner13." ".$baner14." ".$baner15." ".$baner16."'); else if (Szer > 800) document.write('".$baner12." ".$baner13." ".$baner14." ".$baner15." ".$baner16."'); </script>"; ?>
<?php document.write ("<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash4/cabs/swflash.cab#version=4,0,0,0" id="baner-180x80" width="159" height="79"> ?>