www.webdeveloper.com
Results 1 to 7 of 7

Thread: Mobile Redirection Script?? Please Help me...

  1. #1
    Join Date
    Jul 2012
    Location
    Delhi
    Posts
    19

    Mobile Redirection Script?? Please Help me...

    Hi Friends, i need a mobil;e redirection script which send visitors aoutomaclly in mobile version and also when they clicked "View Full Version" then they wuill be see a full version of my site and also they will be redirect to same page whe visiting...
    for example, if they visit http://domain.com/pagename in full version then they wil be redirect to same poage in mobile version, like http://domain.com/m/pagename.
    Please tell me y script... this will be helpful for me.
    Currently i am using this script(which i found through google search) but not working at all, its redirect to mobile but not as i want:
    Code:
    <script type="text/javascript">
    if (screen.width <= 699) {
    if (document.referrer.indexOf('http://hotwallpaperz.x10.mx/m') == -1){
    document.location = "http://hotwallpaperz.x10.mx/m";
    }}
    </script>

  2. #2
    Join Date
    Jan 2004
    Posts
    484
    this is a javascript question not a php

    hint: look up modernizer
    Natdrip :P
    "water go down the hole" - plucky duck

  3. #3
    Join Date
    Dec 2011
    Posts
    15
    I have a confusion. Which one is better for a mobile device.

    http://www.domain.com/mobile or http://m.domain.com/ - for mobile

  4. #4
    Join Date
    Jan 2004
    Posts
    484
    domain doesn't matter

    you can look up 'Media Queries'

    what matters is presentation and that you give your user the ability to view the site in mobile mode or regular

    ie
    HTML Code:
    <link rel='stylesheet' media='screen and (min-width: 701px) and (max-width: 900px)' href='css/medium.css' />
    you should move this conversation to html css of javascript
    Natdrip :P
    "water go down the hole" - plucky duck

  5. #5
    Join Date
    Jul 2012
    Location
    Delhi
    Posts
    19
    Quote Originally Posted by Natdrip View Post
    this is a javascript question not a php

    hint: look up modernizer
    Ooops! My Mistake....!!!

  6. #6
    Join Date
    Jul 2012
    Location
    Delhi
    Posts
    19
    Quote Originally Posted by kavinb3netmobi View Post
    I have a confusion. Which one is better for a mobile device.

    http://www.domain.com/mobile or http://m.domain.com/ - for mobile
    i think both are better but i also like m.domain.com but i am using a free domain so /m is better for users, isn't it?

  7. #7
    Join Date
    Jul 2012
    Location
    Delhi
    Posts
    19
    Quote Originally Posted by Natdrip View Post
    domain doesn't matter

    you can look up 'Media Queries'

    what matters is presentation and that you give your user the ability to view the site in mobile mode or regular

    ie
    HTML Code:
    <link rel='stylesheet' media='screen and (min-width: 701px) and (max-width: 900px)' href='css/medium.css' />
    you should move this conversation to html css of javascript
    Media Queries.??!!
    i am not understand as you say.. can you give me more details?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles