Results 1 to 10 of 10

Thread: Redirection

  1. #1
    Join Date
    Jun 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Redirection

    Hi All,

    i'm currently having an issue with redirection i have found a dynamic drive script that will redirect he user depending on the screen size but my question is, is there a way to modify the page dependant on the users screen res or do i need to create a new site/s using different screen res's eg

    www.domain.com/800*600
    www.domain.com/1024*768

    or can i change the size of the page using a script eg have a site www.domain.com and have the page sit the screen automaticly weather it be 1024*768 or 800*600

  2. #2
    Join Date
    May 2006
    Posts
    259
    Thanks
    4
    Thanked 1 Time in 1 Post

    Default

    Found something that may very well be what your looking for.

    See: http://www.echoecho.com/toolscreenre...onredirect.htm

    I don't know what script your using from DD but they also have this one: http://www.dynamicdrive.com/dynamicindex9/info3.htm

    Looks simple enough - think I would use that one.

    Oh yea, run a search on www.yahoo.com or www.google.com with quotes for - "redirect script" and you'll find a bunch of goodies.
    Last edited by Jack; 06-04-2006 at 03:43 PM.
    "Only dead fish flow with the stream".
    - Unknown

  3. #3
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    is there a way to modify the page dependant on the users screen res
    If you design a page properly, using relative units, the browser will do this for you.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    The only things that don't scale well are graphics, and even some of those can be made to work.

    You should just design your site so it looks good at all resolutions; make it fit within 800, but also scale up well, or have a nice border around it.

    Make you site 800 wide (actually 779, seems right to fit, with scrollbars and such), and have a cool background outside that, so it looks alright at bigger rez.

    Preferably, do what Twey says, but if not possible, just make it not look horrible with the "extra space" around it, as I said above.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  5. #5
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Presumably the OP is in a similar boat the poster in another recent thread.

    Mike

  6. #6
    Join Date
    Jul 2005
    Posts
    16
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Greetings,

    I surely see the problems with redirecting to different pages based on screen size, but I'm also uncomfortably aware of the problems associated with viewing graphics on wildly different-sized screens. How difficult would it be to use screen size info to change image size definitions instead of redirecting to entirely different pages?

    Alan

  7. #7
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    It's not that difficult -- see the logo in the corner of my home page. The problem is designing the images so that they don't look too bad if stretched or squashed within reasonable bounds, since there's no way in CSS to specify that an element should maintain a proportion between its height and width.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  8. #8
    Join Date
    Jul 2005
    Posts
    16
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Twey,

    Well therein lies the rub. The images in question are for the most part photographs that really can't get stretched or squashed. That's partly why a simple binary decision (i.e., big image size or small) based on screen size seems more practical than a liquid layout approach responding to window size. I'm not sure, however, that you can calculate the size of an image using javascript. Dang!

  9. #9
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    You can, but if you're using Javascript anyway you may as well just use it to make sure that the height of the image is kept proportional to its width.
    Code:
    functon Point(x, y) {
      this.x = x;
      this.y = y;
    }
    
    function Rectangle(tl, br) {
      this.tl = tl;
      this.br = br;
    }
    
    Rectangle.prototype = {
      'width' : function() {
        return this.br.x - this.tl.x;
      },
      'height' : function() {
        return this.br.y - this.tl.y;
      }
    };
    
    Rectangle.fromImage = function(imgurl) {
      var im = new Image(imgurl);
      return new Rectangle(new Point(0, 0), new Point(im.width, im.height));
    };
    
    Rectangle.fromElement = function(el) {
      // Mostly from QuirksMode.
      var curleft = 0,
        curtop = 0,
        oel = el;
      if (el.offsetParent) {
        curleft = el.offsetLeft;
        curtop = el.offsetTop;
        while(el = el.offsetParent) {
          curleft += el.offsetLeft;
          curtop += el.offsetTop;
        }
      }
      return new Rectangle(new Point(curleft, curtop), new Point(curleft + oel.offsetWidth, curtop + oel.offsetHeight));
    };
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  10. #10
    Join Date
    Feb 2007
    Location
    🌎
    Posts
    528
    Thanks
    10
    Thanked 10 Times in 10 Posts
    Blog Entries
    2

    Default

    HTML Code:
    <img width="...&#37;" src="...">
    ....(o_ Penguins
    .---/(o_- techno_racing
    +(---//\-' in
    .+(_)--(_)' The McMurdo 500

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •