Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7744989
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T09:54:05+00:00 2026-06-01T09:54:05+00:00

I want retrieve the width and height of browser in pixel(px) using ruby code.

  • 0

I want retrieve the width and height of browser in pixel(px) using ruby code. I don’t have any idea how to do this.

Please help

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T09:54:07+00:00Added an answer on June 1, 2026 at 9:54 am

    With the help of Javascript you can calculate the width and height of browser and pass this info to server using AJAX .

    Else not possible by ruby code .

    EDITED :

    If you are working on rails app than you can do it like :

    To get the browser dimension use the link :
    http://www.howtocreate.co.uk/tutorials/javascript/browserwindow

    And if you using jQuery then use below function to get the height and width of window .

    $(window).width();
    $(window).height();
    

    And use Ajax feature to pass this dimension to your action .

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to retrieve the iframe tags from html code, whose width and height
I have a HTML table as follows. I want retrieve row values from this
Inside Magento templating code I want to get the width and height of the
The youtube embed code's general structure is like this: <iframe width=560 height=349 src=http://www.youtube.com/embed/MiYND_zvIc0 frameborder=0
How to retrieve the Image height and width from the IMG tag using jQuery
I have this jQuery code that retrieves external content using ajax, without refereshing the
I currently have links w/ class=ajax that I want to retrieve the element with
I have DropDownList with CascadingDropDown extender. If I want to retrieve data from the
Using a WebBrowser control in my Windows Forms application, I want to retrieve the
I want to retrieve and store a <div> 's width in a managed bean,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.