Jump to content

Peter

Members
  • Posts

    3
  • Joined

  • Last visited

About Peter

  • Birthday 02/10/1963

Contact Methods

  • Website URL
    http://www.hangar.nl

Profile Information

  • Gender
    Male

Peter's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. <script type="text/javascript" src="http://americanoldtimers.nl/AFBLIJVEN/js/jquery-1.4.2.min.js"></script> <script> var urladresbalk = "http://americanoldtimers.nl/test16.php"; jQuery(window).resize(function() { location.href = (urladresbalk); } ); var w=window,d=document,e=d.documentElement,g=d.getElementsByTagName('body')[0],x=w.innerWidth||e.clientWidth||g.clientWidth,y=w.innerHeight||e.clientHeight||g.clientHeight; document.write('<H1>'+x+' X '+y+''); </script> Thank you again for your answer but this wil not work. I made an other script it works always but not on an I-phone. :-( You can find it here? http://americanoldtimers.nl/test16.php Maybe has someone an solution?
  2. Thank you for your answer, maybe I am doing it wrong but I get not the actualy value off the results. This is my script: <script type="text/javascript" src="http://americanoldtimers.nl/js/jquery-1.4.2.min.js"></script> <script> jQuery(window).resize(function() { viewportwidth=window.innerWidth,viewportheight=window.innerHeight; $('.results').html(viewportwidth); $('.results2').html(viewportheight); } ); </script> <span class='results'>Width</span> <BR> <span class='results2'>Height</span> <P> <span class='results'>Width</span> <BR> <span class='results2'>Height</span> <script> // How can I get the Width and Height here in javascript? </script> <script> // And at the same time the Width and Height here in javascript? </script When you risize the screen you get the width and height. You can see the script working at: http://americanoldtimers.nl/testje.php
  3. I am working this out for weeks, now it is time to ask the experts. When I put <span class='results'></span> on my website I get output on screen. How is it possible to do this with javascript, how can I replace this code for javascript and put the value in an variable?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.